From e3037060a664b0fcf6a38378ba8e180bd4402132 Mon Sep 17 00:00:00 2001 From: Vasilij Litvinov Date: Wed, 25 Nov 2020 13:58:32 +0300 Subject: [PATCH] FIX-#2473: Add tests for ExactStr Signed-off-by: Vasilij Litvinov --- modin/config/test/test_envvars.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modin/config/test/test_envvars.py b/modin/config/test/test_envvars.py index bf4ce04a9aa..a40ae4a0497 100644 --- a/modin/config/test/test_envvars.py +++ b/modin/config/test/test_envvars.py @@ -14,7 +14,7 @@ import os import pytest -from modin.config.envvars import EnvironmentVariable, _check_vars +from modin.config.envvars import EnvironmentVariable, _check_vars, ExactStr @pytest.fixture @@ -25,9 +25,9 @@ def make_unknown_env(): del os.environ[varname] -@pytest.fixture -def make_custom_envvar(): - class CustomVar(EnvironmentVariable, type=str): +@pytest.fixture(params=[str, ExactStr]) +def make_custom_envvar(request): + class CustomVar(EnvironmentVariable, type=request.param): """ custom var """ default = 10 @@ -40,7 +40,7 @@ class CustomVar(EnvironmentVariable, type=str): @pytest.fixture def set_custom_envvar(make_custom_envvar): os.environ[make_custom_envvar.varname] = " custom " - yield "Custom" + yield "Custom" if make_custom_envvar.type is str else " custom " del os.environ[make_custom_envvar.varname]