diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 19:25:14 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-02 07:38:20 -0400 |
commit | c6ba56c68b2a3850f530cc1fdbf9856a90559a1f (patch) | |
tree | 4b2fd9dd4139a5d9ed233ca2da8f1c4952103b39 /tests/goldtest.py | |
parent | d2dad79e0d0611eb519995bd8696f1ada2bcd2cd (diff) | |
download | python-coveragepy-git-c6ba56c68b2a3850f530cc1fdbf9856a90559a1f.tar.gz |
refactor: remove a few more version checks
Diffstat (limited to 'tests/goldtest.py')
-rw-r--r-- | tests/goldtest.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/goldtest.py b/tests/goldtest.py index 7ea42754..57e3df66 100644 --- a/tests/goldtest.py +++ b/tests/goldtest.py @@ -22,10 +22,6 @@ def gold_path(path): return os.path.join(TESTS_DIR, "gold", path) -# "rU" was deprecated in 3.4 -READ_MODE = "rU" if env.PYVERSION < (3, 4) else "r" - - def versioned_directory(d): """Find a subdirectory of d specific to the Python version. For example, on Python 3.6.4 rc 1, it returns the first of these @@ -80,13 +76,13 @@ def compare( for f in diff_files: expected_file = os.path.join(expected_dir, f) - with open(expected_file, READ_MODE) as fobj: + with open(expected_file) as fobj: expected = fobj.read() if expected_file.endswith(".xml"): expected = canonicalize_xml(expected) actual_file = os.path.join(actual_dir, f) - with open(actual_file, READ_MODE) as fobj: + with open(actual_file) as fobj: actual = fobj.read() if actual_file.endswith(".xml"): actual = canonicalize_xml(actual) |