summaryrefslogtreecommitdiff
path: root/tests/core/global.py
blob: a929940080ac5700ab0a6cfb2ec6e10f23eb159a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)