Skip to content

Commit d2fe12e

Browse files
committed
test: enable parallel test execution
1 parent 476ff43 commit d2fe12e

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

Tests/ApplicationService_test.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ViewApplication,
3535
)
3636

37-
from .Utils import skip_if_version_lower_than, verify_version
37+
from .Utils import generate_test_uuid, skip_if_version_lower_than, verify_version
3838

3939

4040
class TestApplicationService(unittest.TestCase):
@@ -45,18 +45,23 @@ def setUpClass(cls) -> None:
4545
Establishes a connection to TM1 and creates TM1 objects to use across all tests
4646
"""
4747

48+
cls.class_uuid = generate_test_uuid()
49+
4850
cls.prefix = "TM1py_Tests_Applications_"
49-
cls.tm1py_app_folder = cls.prefix + "RootFolder"
50-
cls.application_name = cls.prefix + "Application"
51-
cls.cube_name = cls.prefix + "Cube"
52-
cls.view_name = cls.prefix + "View"
53-
cls.subset_name = cls.prefix + "Subset"
54-
cls.process_name = cls.prefix + "Process"
55-
cls.chore_name = cls.prefix + "Chore"
56-
cls.folder_name = cls.prefix + "Folder"
57-
cls.link_name = cls.prefix + "Link"
58-
cls.document_name = cls.prefix + "Document"
59-
cls.dimension_names = [cls.prefix + "Dimension1", cls.prefix + "Dimension2", cls.prefix + "Dimension3"]
51+
cls.tm1py_app_folder = cls.prefix + "RootFolder_" + cls.class_uuid
52+
cls.cube_name = cls.prefix + "Cube_" + cls.class_uuid
53+
cls.view_name = cls.prefix + "View_" + cls.class_uuid
54+
cls.subset_name = cls.prefix + "Subset_" + cls.class_uuid
55+
cls.process_name = cls.prefix + "Process_" + cls.class_uuid
56+
cls.chore_name = cls.prefix + "Chore_" + cls.class_uuid
57+
cls.folder_name = cls.prefix + "Folder_" + cls.class_uuid
58+
cls.link_name = cls.prefix + "Link_" + cls.class_uuid
59+
cls.document_name = cls.prefix + "Document_" + cls.class_uuid
60+
cls.dimension_names = [
61+
cls.prefix + "Dimension1_" + cls.class_uuid,
62+
cls.prefix + "Dimension2_" + cls.class_uuid,
63+
cls.prefix + "Dimension3_" + cls.class_uuid,
64+
]
6065

6166
cls.rename_suffix = "_New"
6267

@@ -166,6 +171,10 @@ def setUpClass(cls) -> None:
166171
else:
167172
cls.tm1.applications.create(application=app, private=False)
168173

174+
def setUp(self) -> None:
175+
test_uuid = generate_test_uuid()
176+
self.application_name = self.prefix + "Application_" + test_uuid
177+
169178
@classmethod
170179
def tearDownClass(cls) -> None:
171180
"""Clean up all test resources."""

0 commit comments

Comments
 (0)