How to use the cppimport.force_rebuild function in cppimport

To help you get started, we’ve selected a few cppimport examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tbenthompson / cppimport / tests / test_cppimport.py View on Github external
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)
github tbenthompson / cppimport / tests / test_cppimport.py View on Github external
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)
github molpopgen / fwdpy11 / tests / test_fitness_callback_polymorphism.py View on Github external
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)