Skip to content

Commit

Permalink
FIX-modin-project#2473: Add tests for ExactStr
Browse files Browse the repository at this point in the history
Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
  • Loading branch information
vnlitvinov committed Nov 25, 2020
1 parent 586efe8 commit e303706
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modin/config/test/test_envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]


Expand Down

0 comments on commit e303706

Please sign in to comment.