Skip to content

Commit

Permalink
Fixed tests/test_pabotprerunmodifier.py
Browse files Browse the repository at this point in the history
  • Loading branch information
joonaskuisma committed Jan 29, 2025
1 parent 6d1fa31 commit ece669a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_pabotprerunmodifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def setUpClass(self):

# pabotprerunmodifier script. Works like Robot Framework --include command
self.modifier_file_path = f'{self.tmpdir}/Modifier.py'
correct_full_name_call = check_robot_version_and_return_name()
with open(self.modifier_file_path, 'w') as modifier_file:
modifier_file.write(
textwrap.dedent(f"""
Expand All @@ -80,10 +81,10 @@ def start_suite(self, suite):
if suite.tests:
for test in suite.tests:
if self.tag in test.tags:
self.list_of_test_names.append(test.{check_robot_version_and_return_name()})
self.list_of_test_names.append(test.{correct_full_name_call})
def end_suite(self, suite):
suite.tests = [t for t in suite.tests if t.full_name in self.list_of_test_names]
suite.tests = [t for t in suite.tests if t.{correct_full_name_call} in self.list_of_test_names]
suite.suites = [s for s in suite.suites if s.test_count > 0]
"""))

Expand Down

0 comments on commit ece669a

Please sign in to comment.