From 639eeed43bbfa0c8793a84a851d4cf7fb15b97d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 29 Aug 2022 20:14:44 +0545 Subject: [PATCH] skip tests that depend on hydra.compose in 3.11 --- tests/func/experiments/test_set_params.py | 15 ++++++++++++++- tests/func/utils/test_hydra.py | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/func/experiments/test_set_params.py b/tests/func/experiments/test_set_params.py index 01bc4c13f..77e3197dc 100644 --- a/tests/func/experiments/test_set_params.py +++ b/tests/func/experiments/test_set_params.py @@ -1,3 +1,5 @@ +import sys + import pytest from ..utils.test_hydra import hydra_setup @@ -17,7 +19,18 @@ def test_modify_params(params_repo, dvc, changes, expected): assert fobj.read().strip() == expected -@pytest.mark.parametrize("hydra_enabled", [True, False]) +@pytest.mark.parametrize( + "hydra_enabled", + [ + pytest.param( + True, + marks=pytest.mark.skipif( + sys.version_info >= (3, 11), reason="unsupported on 3.11" + ), + ), + False, + ], +) @pytest.mark.parametrize( "config_dir,config_name", [ diff --git a/tests/func/utils/test_hydra.py b/tests/func/utils/test_hydra.py index 8dd5ae758..2afb45cae 100644 --- a/tests/func/utils/test_hydra.py +++ b/tests/func/utils/test_hydra.py @@ -1,3 +1,5 @@ +import sys + import pytest from dvc.exceptions import InvalidArgumentError @@ -138,6 +140,7 @@ def hydra_setup(tmp_dir, config_dir, config_name): return str(config_dir) +@pytest.mark.skipif(sys.version_info >= (3, 11), reason="unsupported on 3.11") @pytest.mark.parametrize("suffix", ["yaml", "toml", "json"]) @pytest.mark.parametrize( "overrides,expected",