From 33b41489901cf437d48ab9b08c39923715302721 Mon Sep 17 00:00:00 2001 From: Dan Foster Date: Mon, 4 Jun 2018 12:16:33 +0100 Subject: [PATCH 1/2] match pythonversion that have major/minor with no dot --- hashin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hashin.py b/hashin.py index 1590560..0b1696e 100755 --- a/hashin.py +++ b/hashin.py @@ -261,6 +261,7 @@ def expand_python_version(version): 'cp{major}{minor}', 'py{major}', 'py{major}.{minor}', + 'py{major}{minor}', 'source', 'py2.py3', ] From 8dcb82d81d72292e83986c6f71e1f3a6e91b65a6 Mon Sep 17 00:00:00 2001 From: Dan Foster Date: Mon, 4 Jun 2018 13:30:03 +0100 Subject: [PATCH 2/2] fix tests --- tests/test_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 72cf2de..b54625d 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -923,9 +923,9 @@ def test_release_url_metadata_python(self): def test_expand_python_version(self): self.assertEqual(sorted(hashin.expand_python_version('2.7')), - ['2.7', 'cp27', 'py2', 'py2.7', 'py2.py3', 'source']) + ['2.7', 'cp27', 'py2', 'py2.7', 'py2.py3', 'py27', 'source']) self.assertEqual(sorted(hashin.expand_python_version('3.5')), - ['3.5', 'cp35', 'py2.py3', 'py3', 'py3.5', 'source']) + ['3.5', 'cp35', 'py2.py3', 'py3', 'py3.5', 'py35', 'source']) @cleanup_tmpdir('hashin*') @mock.patch('hashin.urlopen')