diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-15 13:25:29 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-15 13:25:29 -0500 |
| commit | 512f72a690120a6b08ff99d2ed9065859586a698 (patch) | |
| tree | 989f89ffbee5f6093c7f6beab184a9f2d8d6e22c /setuptools/tests/test_resources.py | |
| parent | cddaa77be7c82b6796b43e017c16c6c08727b402 (diff) | |
| parent | 7a991fd283fdf53f7320852e5c9878db6cb84349 (diff) | |
| download | python-setuptools-git-512f72a690120a6b08ff99d2ed9065859586a698.tar.gz | |
Merge pull request #18 from dstufft/hashable-versions
Define a __hash__ on the packaging.version.Version subclasses
Diffstat (limited to 'setuptools/tests/test_resources.py')
| -rw-r--r-- | setuptools/tests/test_resources.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 13f80aa4..1902fb2c 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -528,6 +528,16 @@ class ParseTests(TestCase): self.assertTrue(parse_version("3.0") != tuple(parse_version("2.0"))) self.assertFalse(parse_version("3.0") != tuple(parse_version("3.0"))) + def testVersionHashable(self): + """ + Ensure that our versions stay hashable even though we've subclassed + them and added some shim code to them. + """ + self.assertEqual( + hash(parse_version("1.0")), + hash(parse_version("1.0")), + ) + class ScriptHeaderTests(TestCase): non_ascii_exe = '/Users/José/bin/python' |
