Changeset View
Changeset View
Standalone View
Standalone View
plugins/extensions/pykrita/tests/actionTests/action_test.py
- This file was moved from plugins/extensions/pykrita/tests/action_test.py.
1 | import unittest | 1 | import unittest | ||
---|---|---|---|---|---|
2 | import os | 2 | import os | ||
3 | import sys | 3 | import sys | ||
4 | import test_utils | 4 | from krita import Action | ||
5 | 5 | from PyQt5.QtWidgets import QAction | |||
6 | | ||||
7 | # I will write a class decorator to avoid code repetition | | |||
8 | # at this point of the module | | |||
9 | test_utils.setPykritaInstPath() | | |||
10 | 6 | | |||
11 | 7 | | |||
12 | class TestAction(unittest.TestCase): | 8 | class TestAction(unittest.TestCase): | ||
13 | 9 | | |||
14 | def setUp(self): | 10 | def setUp(self): | ||
15 | from krita import Action | | |||
16 | self.instance = Action() | 11 | self.instance = Action() | ||
17 | 12 | | |||
18 | def testCreateNewAction(self): | 13 | def testCreateNewAction(self): | ||
19 | self.assertEqual(bool(self.instance), True) | 14 | self.assertEqual(bool(self.instance), True) | ||
15 | | ||||
16 | def testCreateNewActionWithQAction(self): | ||||
17 | new_action = Action("test", QAction("test")) | ||||
18 | self.assertEqual(bool(new_action), True) |