summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-03-07 17:51:38 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-03-11 06:38:42 -0500
commitb9f4c86917422de3fe6ecd2976d7213897c93bb2 (patch)
treec8da98046baddd68bcde6a0834f861e071a69a49 /tests/test_files.py
parentaf234f4a2a08dc1616c2270df6349925221c81e8 (diff)
downloadpython-coveragepy-git-b9f4c86917422de3fe6ecd2976d7213897c93bb2.tar.gz
test: reduce use of unittest
Diffstat (limited to 'tests/test_files.py')
-rw-r--r--tests/test_files.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index 6040b889..512e4294 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -41,7 +41,7 @@ class FilesTest(CoverageTest):
a1 = self.abs_path("sub/proj1/file1.py")
a2 = self.abs_path("sub/proj2/file2.py")
d = os.path.normpath("sub/proj1")
- self.chdir(d)
+ os.chdir(d)
files.set_relative_directory()
assert files.relative_filename(a1) == "file1.py"
assert files.relative_filename(a2) == a2
@@ -60,7 +60,7 @@ class FilesTest(CoverageTest):
def test_canonical_filename_ensure_cache_hit(self):
self.make_file("sub/proj1/file1.py")
d = actual_path(self.abs_path("sub/proj1"))
- self.chdir(d)
+ os.chdir(d)
files.set_relative_directory()
canonical_path = files.canonical_filename('sub/proj1/file1.py')
assert canonical_path == self.abs_path('file1.py')
@@ -140,8 +140,8 @@ def test_fnmatches_to_regex(patterns, case_insensitive, partial, matches, nomatc
class MatcherTest(CoverageTest):
"""Tests of file matchers."""
- def setUp(self):
- super(MatcherTest, self).setUp()
+ def setup_test(self):
+ super(MatcherTest, self).setup_test()
files.set_relative_directory()
def assertMatches(self, matcher, filepath, matches):