How to use the birdseye.import_hook.should_trace function in birdseye

To help you get started, we’ve selected a few birdseye 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 alexmojaki / birdseye / tests / test_import_hook.py View on Github external
self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('import birdseye.trace_module_deep')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module_deep, eye')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module, eye')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import eye')
        self.assertFalse(deep)
        self.assertIsNone(trace_stmt)
github alexmojaki / birdseye / tests / test_import_hook.py View on Github external
def test_should_trace(self):
        from birdseye.import_hook import should_trace
        deep, trace_stmt = should_trace('import birdseye.trace_module')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('import birdseye.trace_module_deep')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module_deep, eye')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module, eye')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import eye')
        self.assertFalse(deep)
        self.assertIsNone(trace_stmt)
github alexmojaki / birdseye / tests / test_import_hook.py View on Github external
def test_should_trace(self):
        from birdseye.import_hook import should_trace
        deep, trace_stmt = should_trace('import birdseye.trace_module')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('import birdseye.trace_module_deep')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module_deep, eye')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module, eye')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import eye')
        self.assertFalse(deep)
        self.assertIsNone(trace_stmt)
github alexmojaki / birdseye / tests / test_import_hook.py View on Github external
def test_should_trace(self):
        from birdseye.import_hook import should_trace
        deep, trace_stmt = should_trace('import birdseye.trace_module')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('import birdseye.trace_module_deep')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module_deep, eye')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module, eye')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import eye')
        self.assertFalse(deep)
        self.assertIsNone(trace_stmt)
github alexmojaki / birdseye / tests / test_import_hook.py View on Github external
def test_should_trace(self):
        from birdseye.import_hook import should_trace
        deep, trace_stmt = should_trace('import birdseye.trace_module')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('import birdseye.trace_module_deep')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module_deep, eye')
        self.assertTrue(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import trace_module, eye')
        self.assertFalse(deep)
        self.assertIsNotNone(trace_stmt)

        deep, trace_stmt = should_trace('from birdseye import eye')