Exemplo n.º 1
0
    def test_004_feature_deinitialization(self):
        load_ipython_extension(self.shell)
        yuuno = Yuuno.instance()
        unload_ipython_extension(self.shell)

        self.assertTrue(yuuno.environment.features[0].init_called)
        self.assertTrue(yuuno.environment.features[0].deinit_called)
Exemplo n.º 2
0
    def test_003_feature_initialization(self):
        load_ipython_extension(self.shell)
        yuuno = Yuuno.instance()

        self.assertInstanceIn(yuuno.environment.features, TestFeature)
        self.assertTrue(yuuno.environment.features[0].init_called)
        self.assertFalse(yuuno.environment.features[0].deinit_called)
Exemplo n.º 3
0
 def test_001_ipython_enable(self):
     load_ipython_extension(self.shell)
     yuuno = Yuuno.instance()
     self.assertIsInstance(yuuno.environment, YuunoIPythonEnvironment)
     self.assertIn(yuuno.environment, self.shell.configurables)
     self.assertInstanceIn(self.shell.configurables, SupportedTestExtension)
     self.assertIn(yuuno, self.shell.configurables)
Exemplo n.º 4
0
    def test_002_ipython_disable(self):
        load_ipython_extension(self.shell)
        yuuno = Yuuno.instance()
        ext = yuuno.extensions[0]
        unload_ipython_extension(self.shell)

        self.assertIsNot(yuuno, Yuuno.instance())
        self.assertNotIn(yuuno, self.shell.configurables)
        self.assertNotIn(yuuno.environment, self.shell.configurables)
        self.assertNotIn(ext, self.shell.configurables)
    def setUp(self):
        Settings.DEFAULT_EXTENSION_TYPES.clear()
        Settings.DEFAULT_EXTENSION_TYPES.append("tests.test_ipython_formatter.TestClipExtension")
        YuunoIPythonEnvironment.feature_classes = [
            "tests.test_ipython_magic.TestMagicFeature"
        ]

        self.shell = globalipapp.get_ipython()
        load_ipython_extension(self.shell)

        self.loaded = True
Exemplo n.º 6
0
    def setUp(self):
        Settings.DEFAULT_EXTENSION_TYPES.clear()
        Settings.DEFAULT_EXTENSION_TYPES.append(
            "tests.test_ipython_formatter.TestClipExtension")
        YuunoIPythonEnvironment.feature_classes = [
            "yuuno_ipython.ipython.formatter.Formatter"
        ]

        self.shell = globalipapp.get_ipython()
        load_ipython_extension(self.shell)
        Yuuno.instance().output.icc_profile = None

        self.loaded = True
Exemplo n.º 7
0
    def setUp(self):
        Settings.DEFAULT_EXTENSION_TYPES.clear()
        Settings.DEFAULT_EXTENSION_TYPES.append(
            'tests.test_ipython_namespace.TestExtension')
        YuunoIPythonEnvironment.feature_classes = [
            "yuuno_ipython.ipython.namespace.Namespace"
        ]

        self.shell = globalipapp.get_ipython()
        load_ipython_extension(self.shell)

        self.loaded = True

        self.yuuno = Yuuno.instance()