summaryrefslogtreecommitdiff
path: root/tests/test_parsing.py
Commit message (Collapse)AuthorAgeFilesLines
* Linting.Raphaël Barrois2020-07-071-0/+2
| | | | Add missing blank lines.
* Restore Python2 support.rbarrois/restore-py2Raphaël Barrois2019-08-291-0/+13
|
* Add `Version.precedence_key`.Raphaël Barrois2019-08-261-2/+2
| | | | | | | | | | | | | | | | | | | This will be used in `sort(..., key=lambda v: v.precedence_key)`. Remove previous comparison/ordering implementation. The current implementation relies on a 4-tuple: - major, minor, patch (as integers) - natural order matches precedence rules - a tuple of identifiers for the prerelease component. The identifiers for the prerelease components are based on: - A `NumericIdentifier` class, that compares number using their natural order, and always compares lower than non-numeric identifiers - A `AlphaIdentifier` class for non-numeric identifiers; it compares versions using ASCII ordering. - A `MaxIdentifier` class, that compares higher to any other identifier; used to ensure that a non-prerelease version is greater than any of its prereleases.
* Lint test code.Raphaël Barrois2019-08-241-1/+4
|
* Use unittest.subTest in tests.Raphaël Barrois2019-08-241-30/+36
| | | | This provides more helpful error messages when a test fails.
* Allow Version(major=1, ...).Raphaël Barrois2019-08-241-0/+21
| | | | | | Eases the creation of version objects from existing versions. We still validate the type and structure of each component.
* Remove Copyright years (Closes #28)Raphaël Barrois2016-02-121-1/+1
| | | | It seems that stating the copyright years is useless after all :)
* Forbid build metadata ordering (See #18)Raphaël Barrois2015-09-151-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SemVer 2.0.0 states that "Build metadata SHOULD be ignored when determining version precedence". This means that, when comparing ``0.1.0+1`` to ``0.1.0+bcd``:: >>> Version('0.1.0+1') == Version('0.1.0+bcd') False >>> Version('0.1.0+1') != Version('0.1.0+bcd') True >>> Version('0.1.0+1') < Version('0.1.0+bcd') False >>> Version('0.1.0+1') > Version('0.1.0+bcd') False >>> Version('0.1.0+1') <= Version('0.1.0+bcd') False >>> Version('0.1.0+1') >= Version('0.1.0+bcd') False >>> compare(Version('0.1.0+1'), Version('0.1.0+bcd')) NotImplemented This change also has the following effects: - When including build metadata in a ``Spec``, the only valid options are ``Spec('==0.1.0+sth')`` and ``Spec('!=0.1.0+sth')`` - The meaning of ``Spec('==0.1.0+')`` is now "Only version 0.1.0 without build metadata" - ``Spec('==0.1.0')`` now matches ``Version('0.1.0+anything')``
* Update copyrightRaphaël Barrois2014-03-081-1/+1
|
* Add Python3 support.Raphaël Barrois2013-03-211-1/+3
|
* Fix license string.Raphaël Barrois2013-03-211-0/+1
|
* Happy New Year!Raphaël Barrois2013-01-021-0/+1
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* s/SemanticVersion/Version/Raphaël Barrois2012-05-151-4/+4
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Full coverage.Raphaël Barrois2012-05-151-1/+5
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Make test modules runable.Raphaël Barrois2012-05-151-0/+0
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Initial versionRaphaël Barrois2012-05-141-0/+64
Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>