Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_import_hook():
# Force rebuild to make sure we're not just reloading the already compiled
# module from disk
cppimport.force_rebuild(True)
import hook_test
cppimport.force_rebuild(False)
def test_import_hook():
# Force rebuild to make sure we're not just reloading the already compiled
# module from disk
cppimport.force_rebuild(True)
import hook_test
cppimport.force_rebuild(False)
import cppimport
cppimport.force_rebuild()
cppimport.set_quiet(False)
snowdrift = cppimport.imp("snowdrift")
test_polymorphism = cppimport.imp("test_polymorphism")
import unittest
import fwdpy11.fitness as fp11w
import re
class testFitnessPolymorphism(unittest.TestCase):
@classmethod
def setUpClass(self):
self.w = [
fp11w.SlocusAdditive(),
fp11w.SlocusMult(),
snowdrift.SlocusSnowdrift(0.2, -0.2, 1, -2)]
self.v = test_polymorphism.test_callback_names(self.w)