How to use the flupy.cli.cli.execute_imports function in flupy

To help you get started, we’ve selected a few flupy 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 olirice / flupy / tests / test_cli.py View on Github external
def test_parse_args(self):
        with self.assertRaises(SystemExit) as cm:
            parse_args([])
        assert cm.exception.code == 2

        args = parse_args(["_"])
        assert args.command == '_'

        args = parse_args(["_", "-i", "os:environ:env"])
        assert "os:environ:env" in getattr(args, 'import')
        assert args.command == '_'

        with self.assertRaises(NameError):
            json

        execute_imports(['json'])
        assert 'json' in sys.modules

flupy

Method chaining built on generators

MIT
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis