Skip to content

Commit

Permalink
More pylint fixes. (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbassett-tibco committed Sep 23, 2024
1 parent 6c86a6b commit 0b39ecb
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions spotfire/test/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ def load_tests(loader, tests, pattern): # pylint: disable=unused-argument
return test_suite


py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
test_env = os.getenv("TEST_ENVIRONMENT")
report_title_suffix, report_name = "", f"{platform.system().lower()}-{py_version}"
if test_env:
report_title_suffix = f" ({test_env} test environment)"
report_name += f"-{test_env}"
PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"
TEST_ENVIRONMENT = os.getenv("TEST_ENVIRONMENT")
REPORT_SUFFIX = ""
REPORT_NAME = f"{platform.system().lower()}-{PYTHON_VERSION}"
if TEST_ENVIRONMENT:
REPORT_SUFFIX = f" ({TEST_ENVIRONMENT} test environment)"
REPORT_NAME += f"-{TEST_ENVIRONMENT}"
runner = HtmlTestRunner.HTMLTestRunner(combine_reports=True,
output="build/test-results/",
template=utils.get_test_data_file("template.html.in"),
report_title=f"Python {py_version} on {platform.system()}{report_title_suffix}",
report_name=report_name,
report_title=f"Python {PYTHON_VERSION} on {platform.system()}{REPORT_SUFFIX}",
report_name=REPORT_NAME,
add_timestamp=False)
unittest.main(testRunner=runner, failfast=False, buffer=False, catchbreak=False)

0 comments on commit 0b39ecb

Please sign in to comment.