Skip to content

Commit

Permalink
fix environment path variable dictionary lookup in run_tests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-McCann-HG committed Apr 19, 2024
1 parent 5ac45ae commit 6913c95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions QGIS-AIMS-Plugin/test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def _write(self, m):
def run_tests():
app = QgsApplication.instance()
try:
test_module_name = os.environ["QGIS_TEST_MODULE"]
test_class_name = os.environ["QGIS_TEST_CLASS"]
test_name = os.environ["QGIS_TEST_NAME"]
test_module_name = os.environ.get("QGIS_TEST_MODULE","")
test_class_name = os.environ.get("QGIS_TEST_CLASS","")
test_name = os.environ.get("QGIS_TEST_NAME","")
if test_module_name != "" and test_class_name != "" and test_name != "":
test_suite = unittest.TestLoader().loadTestsFromName(f"{test_class_name}.{test_name}", importlib.import_module(test_module_name))
elif test_module_name != "" and test_class_name != "":
Expand Down

0 comments on commit 6913c95

Please sign in to comment.