Skip to content

Commit 2a504fd

Browse files
committed
Remove redundant Python 2 code
1 parent 1fcdb3c commit 2a504fd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/test_api.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,8 @@ def _test_files(files):
206206
file.read_text()
207207

208208
def test_file_hash_repr(self):
209-
try:
210-
assertRegex = self.assertRegex
211-
except AttributeError:
212-
# Python 2
213-
assertRegex = self.assertRegexpMatches
214-
215209
util = [p for p in files('distinfo-pkg') if p.name == 'mod.py'][0]
216-
assertRegex(repr(util.hash), '<FileHash mode: sha256 value: .*>')
210+
self.assertRegex(repr(util.hash), '<FileHash mode: sha256 value: .*>')
217211

218212
def test_files_dist_info(self):
219213
self._test_files(files('distinfo-pkg'))

0 commit comments

Comments
 (0)