From 8ab5c8124558f45a43569fcc2c74c86be29d7a7f Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 26 Jan 2022 09:33:35 +0100 Subject: [PATCH] remove deprecated call to distutils strtobool --- tests/unit/contentproviders/test_mercurial.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/unit/contentproviders/test_mercurial.py b/tests/unit/contentproviders/test_mercurial.py index 25257bf3..4619ef86 100644 --- a/tests/unit/contentproviders/test_mercurial.py +++ b/tests/unit/contentproviders/test_mercurial.py @@ -1,15 +1,20 @@ -from pathlib import Path -import subprocess -from tempfile import TemporaryDirectory import os -from distutils.util import strtobool +import subprocess +from pathlib import Path +from tempfile import TemporaryDirectory import pytest from repo2docker.contentproviders import Mercurial from repo2docker.contentproviders.mercurial import args_enabling_topic -SKIP_HG = strtobool(os.environ.get("REPO2DOCKER_SKIP_HG_TESTS", "False")) + +SKIP_HG = os.environ.get("REPO2DOCKER_SKIP_HG_TESTS", "").lower() not in { + "", + "0", + "false", + "no", +} skip_if_no_hg_tests = pytest.mark.skipif( SKIP_HG,