diff --git a/.github/workflows/run-tests-workflow.yml b/.github/workflows/run-tests-workflow.yml index ab0c818e1..9ef38457a 100644 --- a/.github/workflows/run-tests-workflow.yml +++ b/.github/workflows/run-tests-workflow.yml @@ -25,6 +25,14 @@ jobs: python-version: 3.7 test-env: "PyQt5~=5.12.0" + - os: ubuntu-20.04 + python-version: 3.6 + test-env: "PyQt5~=5.15.0" + + - os: ubuntu-20.04 + python-version: 3.7 + test-env: "PyQt5~=5.15.0" + - os: ubuntu-20.04 python-version: 3.8 test-env: "PyQt5~=5.14.0" diff --git a/orangecanvas/application/application.py b/orangecanvas/application/application.py index e03b0d7cd..25254ee10 100644 --- a/orangecanvas/application/application.py +++ b/orangecanvas/application/application.py @@ -183,9 +183,13 @@ def argumentParser(): os.environ.get("QT_SCALE_FACTOR_ROUNDING_POLICY"), Qt.HighDpiScaleFactorRoundingPolicy.PassThrough ) + + def converter(value): + # dict.get wrapper due to https://bugs.python.org/issue16516 + return HighDpiScaleFactorRoundingPolicyLookup.get(value) parser.add_argument( "-scale-factor-rounding-policy", - type=HighDpiScaleFactorRoundingPolicyLookup.get, + type=converter, choices=[*HighDpiScaleFactorRoundingPolicyLookup.values(), None], default=default, ) diff --git a/orangecanvas/application/tests/test_application.py b/orangecanvas/application/tests/test_application.py index 922429470..479324a3e 100644 --- a/orangecanvas/application/tests/test_application.py +++ b/orangecanvas/application/tests/test_application.py @@ -23,6 +23,12 @@ def test_application(self): ]) self.assertEqual(res.returncode, 0) + def test_application_help(self): + res = sh.python_run([ + "-m", "orangecanvas", "--help" + ]) + self.assertEqual(res.returncode, 0) + def remove_after_exit(fname): appmod.run_after_exit([