From 7ef65faa7fce61c558b88e8ed97258f211f93904 Mon Sep 17 00:00:00 2001 From: Giuseppe Steduto Date: Fri, 26 Jan 2024 16:26:21 +0100 Subject: [PATCH] test: allow Snakemake tests to run on newer Python versions (#700) After upgrading Snakemake to version 7.32.4 (reanahub/reana-commons#435) there is no need to avoid running Snakemake tests on Python 3.11 and 3.12, as it should be supported. Closes #655 --- reana_client/api/client.py | 6 +++--- reana_client/validation/environments.py | 8 +++++--- tests/test_cli_workflows.py | 4 ---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/reana_client/api/client.py b/reana_client/api/client.py index ba0d83bb..ecdfd5e4 100644 --- a/reana_client/api/client.py +++ b/reana_client/api/client.py @@ -303,9 +303,9 @@ def create_workflow_from_json( reana_yaml["outputs"] = outputs if workflow_file: reana_yaml["workflow"]["file"] = workflow_file - reana_yaml["workflow"][ - "specification" - ] = load_workflow_spec_from_reana_yaml(reana_yaml, workspace_path) + reana_yaml["workflow"]["specification"] = ( + load_workflow_spec_from_reana_yaml(reana_yaml, workspace_path) + ) else: reana_yaml["workflow"]["specification"] = workflow_json # The function below loads the input parameters into the reana_yaml dictionary diff --git a/reana_client/validation/environments.py b/reana_client/validation/environments.py index 878d9dda..0df707c8 100644 --- a/reana_client/validation/environments.py +++ b/reana_client/validation/environments.py @@ -434,9 +434,11 @@ def validate_environment(self): def _check_environment(environment): image = "{}{}".format( environment["image"], - ":{}".format(environment["imagetag"]) - if "imagetag" in environment - else "", + ( + ":{}".format(environment["imagetag"]) + if "imagetag" in environment + else "" + ), ) k8s_uid = next( ( diff --git a/tests/test_cli_workflows.py b/tests/test_cli_workflows.py index 5a0e7fe3..0c244643 100644 --- a/tests/test_cli_workflows.py +++ b/tests/test_cli_workflows.py @@ -580,10 +580,6 @@ def test_create_snakemake_workflow_from_json_parameters( external_parameter_yaml_file, ): """Test create workflow from json with external parameters.""" - if sys.version_info.major == 3 and sys.version_info.minor in (11, 12): - pytest.xfail( - "Snakemake features of reana-client are not supported on Python 3.11" - ) status_code = 201 response = { "message": "The workflow has been successfully created.",