Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a504fd

Browse filesBrowse files
committed
Remove redundant Python 2 code
1 parent 1fcdb3c commit 2a504fd
Copy full SHA for 2a504fd

File tree

Expand file treeCollapse file tree

1 file changed

+1
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-7
lines changed

‎tests/test_api.py

Copy file name to clipboardExpand all lines: tests/test_api.py
+1-7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.