summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/core/global.py22
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)