robotframework-pabot 4.0.4__tar.gz → 4.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/PKG-INFO +1 -1
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/__init__.py +1 -1
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/pabot.py +5 -2
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/robotframework_pabot.egg-info/PKG-INFO +1 -1
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/robotframework_pabot.egg-info/SOURCES.txt +1 -0
- robotframework_pabot-4.0.5/tests/test_prerunmodifier.py +92 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/LICENSE.txt +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/MANIFEST.in +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/README.md +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/pyproject.toml +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/setup.cfg +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/setup.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/SharedLibrary.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/arguments.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/clientwrapper.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/coordinatorwrapper.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/execution_items.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/pabotlib.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/py3/__init__.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/py3/client.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/py3/coordinator.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/py3/messages.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/py3/worker.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/result_merger.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/robotremoteserver.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/pabot/workerwrapper.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/robotframework_pabot.egg-info/dependency_links.txt +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/robotframework_pabot.egg-info/entry_points.txt +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/robotframework_pabot.egg-info/requires.txt +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/src/robotframework_pabot.egg-info/top_level.txt +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_arguments_output.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_depends.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_functional.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_ordering.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_pabot.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_pabotlib.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_pabotsuitenames_io.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_resultmerger.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_stacktrace.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_testlevelsplit_include.py +0 -0
- {robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_testlevelsplit_output_task_order.py +0 -0
|
@@ -1197,13 +1197,16 @@ def generate_suite_names_with_builder(outs_dir, datasources, options):
|
|
|
1197
1197
|
)
|
|
1198
1198
|
|
|
1199
1199
|
suite = builder.build(*datasources)
|
|
1200
|
-
|
|
1201
|
-
suite.configure(**settings.suite_config)
|
|
1200
|
+
|
|
1202
1201
|
if settings.pre_run_modifiers:
|
|
1203
1202
|
_write.error = _write.warn = _write.info = _write.debug = _write.trace = _write
|
|
1204
1203
|
suite.visit(
|
|
1205
1204
|
ModelModifier(settings.pre_run_modifiers, settings.run_empty_suite, _write)
|
|
1206
1205
|
)
|
|
1206
|
+
|
|
1207
|
+
settings.rpa = builder.rpa
|
|
1208
|
+
suite.configure(**settings.suite_config)
|
|
1209
|
+
|
|
1207
1210
|
all_suites = (
|
|
1208
1211
|
get_all_suites_from_main_suite(suite.suites) if suite.suites else [suite]
|
|
1209
1212
|
)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
import tempfile
|
|
3
|
+
import textwrap
|
|
4
|
+
import shutil
|
|
5
|
+
import subprocess
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PrerunModifierTests(unittest.TestCase):
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(self):
|
|
12
|
+
self.tmpdir = tempfile.mkdtemp()
|
|
13
|
+
|
|
14
|
+
# robot case file
|
|
15
|
+
self.robot_file_path = f'{self.tmpdir}/test.robot'
|
|
16
|
+
with open(self.robot_file_path, 'w') as robot_file:
|
|
17
|
+
robot_file.write(
|
|
18
|
+
textwrap.dedent("""
|
|
19
|
+
*** Test Cases ***
|
|
20
|
+
Testing 1
|
|
21
|
+
[Tags] tag
|
|
22
|
+
Log hello
|
|
23
|
+
|
|
24
|
+
Testing 2
|
|
25
|
+
[Tags] tag
|
|
26
|
+
Log world
|
|
27
|
+
"""))
|
|
28
|
+
|
|
29
|
+
# prerunmodifier script
|
|
30
|
+
self.modifier_file_path = f'{self.tmpdir}/Modifier.py'
|
|
31
|
+
with open(self.modifier_file_path, 'w') as modifier_file:
|
|
32
|
+
modifier_file.write(
|
|
33
|
+
textwrap.dedent("""
|
|
34
|
+
from robot.api import SuiteVisitor
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Modifier(SuiteVisitor):
|
|
38
|
+
def start_suite(self, suite):
|
|
39
|
+
if suite.tests:
|
|
40
|
+
for test in suite.tests:
|
|
41
|
+
if '1' in test.name:
|
|
42
|
+
name = 'new-name-1'
|
|
43
|
+
tag = 'tag1'
|
|
44
|
+
else:
|
|
45
|
+
name = 'new-name-2'
|
|
46
|
+
tag = 'tag2'
|
|
47
|
+
test.name = name
|
|
48
|
+
test.tags.add([tag])
|
|
49
|
+
"""))
|
|
50
|
+
|
|
51
|
+
def test_pre_run_with_new_tag(self):
|
|
52
|
+
process = subprocess.Popen(
|
|
53
|
+
[
|
|
54
|
+
sys.executable,
|
|
55
|
+
"-m", "pabot.pabot",
|
|
56
|
+
"--prerunmodifier",
|
|
57
|
+
self.modifier_file_path,
|
|
58
|
+
"--include",
|
|
59
|
+
"tag2",
|
|
60
|
+
self.robot_file_path
|
|
61
|
+
],
|
|
62
|
+
cwd=self.tmpdir,
|
|
63
|
+
stdout=subprocess.PIPE,
|
|
64
|
+
stderr=subprocess.PIPE
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
stdout, stderr = process.communicate()
|
|
68
|
+
self.assertIn(b'1 tests, 1 passed, 0 failed, 0 skipped.', stdout)
|
|
69
|
+
|
|
70
|
+
def test_pre_run_with_new_name(self):
|
|
71
|
+
process = subprocess.Popen(
|
|
72
|
+
[
|
|
73
|
+
sys.executable,
|
|
74
|
+
"-m", "pabot.pabot",
|
|
75
|
+
"--prerunmodifier",
|
|
76
|
+
self.modifier_file_path,
|
|
77
|
+
"--test",
|
|
78
|
+
"new-name-1",
|
|
79
|
+
self.robot_file_path
|
|
80
|
+
],
|
|
81
|
+
cwd=self.tmpdir,
|
|
82
|
+
stdout=subprocess.PIPE,
|
|
83
|
+
stderr=subprocess.PIPE
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
stdout, stderr = process.communicate()
|
|
87
|
+
self.assertIn(b'1 tests, 1 passed, 0 failed, 0 skipped.', stdout)
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def tearDownClass(self):
|
|
91
|
+
shutil.rmtree(self.tmpdir)
|
|
92
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_pabot-4.0.4 → robotframework_pabot-4.0.5}/tests/test_testlevelsplit_include.py
RENAMED
|
File without changes
|
|
File without changes
|