diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-05-18 01:16:39 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-05-18 01:16:39 +0200 |
commit | c555c3c2535db201f67c243e4ee82e5b848c9ff3 (patch) | |
tree | 0a8c11b117d585331ea5f26008731723bb1764e1 | |
parent | 6b5a291dfab08f4ae2cd7ab8c63920477cb94458 (diff) | |
download | semantic-version-c555c3c2535db201f67c243e4ee82e5b848c9ff3.tar.gz |
Test handling of the 'partial' flag in hashing.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
-rwxr-xr-x | tests/test_base.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_base.py b/tests/test_base.py index b1a07ed..6dbda18 100755 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -149,6 +149,17 @@ class VersionTestCase(unittest.TestCase): self.assertEqual(1, len(set([base.Version('0.1.0'), base.Version('0.1.0')]))) + self.assertEqual(2, + len(set([base.Version('0.1.0'), base.Version('0.1.0', partial=True)]))) + + # A fully-defined 'partial' version isn't actually partial. + self.assertEqual(1, + len(set([ + base.Version('0.1.0-a1+34'), + base.Version('0.1.0-a1+34', partial=True) + ])) + ) + class SpecTestCase(unittest.TestCase): components = { |