diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-12-12 17:07:05 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-12-12 17:07:05 (GMT) |
commit | c806bc75910c129c6d78115cfdc571316e060412 (patch) | |
tree | 3752138befa5508fe43ea3410237c5edb1163cbf /tests | |
parent | d5b598b14fd4c50847ce536692ded258ba1720ca (diff) |
Reorganized the global variables access in the Python bindings.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/global.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/core/global.py b/tests/core/global.py new file mode 100644 index 0000000..a929940 --- /dev/null +++ b/tests/core/global.py @@ -0,0 +1,22 @@ +#!/usr/bin/python3-dbg +# -*- coding: utf-8 -*- + + +from chrysacase import ChrysalideTestCase +from pychrysalide.analysis import StudyProject +from pychrysalide.core import get_current_project, set_current_project + + +class TestCoreGlobal(ChrysalideTestCase): + """TestCase for analysis.core.global.""" + + def testProject(self): + """Get and set the current project.""" + + self.assertIsNone(get_current_project()) + + prj = StudyProject() + + set_current_project(prj) + + self.assertEqual(get_current_project(), prj) |