From 54eb890e24713c5375cce7005f78bf2863f7f901 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 1 Dec 2022 07:51:46 -0500 Subject: test: don't add tests conditionally, skip them instead This keeps the total number of tests the same in all situations. --- tests/test_files.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/test_files.py') diff --git a/tests/test_files.py b/tests/test_files.py index 85fb6dbb..5d00bca8 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -561,13 +561,12 @@ class PathAliasesTest(CoverageTest): self.assert_mapped(aliases, '/foo/bar/d1/x.py', './mysrc1/x.py') self.assert_mapped(aliases, '/foo/bar/d2/y.py', './mysrc2/y.py') - # The root test case was added for the manylinux Docker images, - # and I'm not sure how it should work on Windows, so skip it. - cases = [".", "..", "../other"] - if not env.WINDOWS: - cases += ["/"] - @pytest.mark.parametrize("dirname", cases) + @pytest.mark.parametrize("dirname", [".", "..", "../other", "/"]) def test_dot(self, dirname): + if env.WINDOWS and dirname == "/": + # The root test case was added for the manylinux Docker images, + # and I'm not sure how it should work on Windows, so skip it. + pytest.skip("Don't know how to handle root on Windows") aliases = PathAliases() aliases.add(dirname, '/the/source') the_file = os.path.join(dirname, 'a.py') -- cgit v1.2.1