summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue #33 - null VersionField breaks ORMHugo Rodger-Brown2015-11-241-0/+45
| | | | | | | | | | | | | | I've updated the `BaseSemVerField` method `get_prep_value` so that it will return None when the field value is None, rather than the string representation 'None'. Previously this would break the ORM, which would save the string 'None' into the database, and then attempt to parse that as a version number. This change means that the default empty value for both VersionField and SpecField is None. Both derive from CharField, which uses an empty string as its default empty value, however it seems more logical in the case of these objects that no object is null, and not an empty string. Includes tests.
* Forbid build metadata ordering (See #18)Raphaël Barrois2015-09-154-39/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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')``
* Minor fixes to tests.Raphaël Barrois2015-07-022-5/+5
|
* fixed tests to work with django 1.7 and 1.8Michael Hrivnak2015-07-022-17/+32
| | | | | | Added several django versions to the travis-ci build fixes #22
* Adds a new bump version func to the API.Rick Eyre2015-04-011-0/+28
|
* Accept '*' as a Spec (Closes #8).Raphaël Barrois2014-03-161-0/+12
| | | | Spec('*') will match all valid Version objects.
* moved django test app settings to the django test app moduleMichael Hrivnak2014-03-162-12/+24
| | | | | | | | | ... to guarantee the settings get executed before any code in that app. Since python's unittest.TestLoader does not guarantee in what order it will import modules while hunting for test cases, the unit tests could fail to even load if tests.django_test_app.models was loaded before tests.test_django. This failure was seen on ARM machines, which happened to traverse the module tree in an inconvenient order.
* Update copyrightRaphaël Barrois2014-03-087-7/+7
|
* Upgrade to semver-2.0.0 (Closes #3)Raphaël Barrois2014-02-132-2/+165
|
* tests: Fix test running when Django isn't available.Raphaël Barrois2013-12-231-12/+19
|
* Add Python3 support.Raphaël Barrois2013-03-214-7/+42
|
* Fix license string.Raphaël Barrois2013-03-214-1/+4
|
* Add semantic_version.validate (Closes #2).Raphaël Barrois2013-03-211-0/+40
| | | | | | Simple way of testing whether a string is a 'valid' SemVer version. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add Version.coerce.Raphaël Barrois2013-03-203-0/+49
| | | | Some people don't use semver yet...
* Fix handling of partial versions (Closes #1).Raphaël Barrois2013-03-203-3/+21
|
* Happy New Year!Raphaël Barrois2013-01-025-4/+6
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Properly validate values.Raphaël Barrois2012-05-221-0/+4
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Add introspection rules for southRaphaël Barrois2012-05-221-0/+51
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Cleanup __repr__ of Version()Raphaël Barrois2012-05-221-6/+4
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Add a few tests.Raphaël Barrois2012-05-221-0/+30
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Introduce Spec.filter and Spec.select.Raphaël Barrois2012-05-221-0/+61
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Remove SpecItem.Raphaël Barrois2012-05-213-27/+14
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Rename Spec to SpecItem and SpecList to SpecItem.Raphaël Barrois2012-05-213-38/+38
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Update rules and code to follow readable specifications.Raphaël Barrois2012-05-203-84/+84
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Allow passing in spec lists in separate arguments to SpecList.Raphaël Barrois2012-05-181-0/+16
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Test handling of the 'partial' flag in hashing.Raphaël Barrois2012-05-181-0/+11
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Ensure partial flag is kept around.Raphaël Barrois2012-05-181-0/+1
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Introduce the SpecListField.Raphaël Barrois2012-05-172-9/+25
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add SpecList.Raphaël Barrois2012-05-171-0/+62
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add support for __hash__ to Version/Spec.Raphaël Barrois2012-05-171-0/+8
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Use tuples instead of lists.Raphaël Barrois2012-05-171-36/+36
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add tests for loose version specs.Raphaël Barrois2012-05-171-0/+98
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Fix testsRaphaël Barrois2012-05-171-3/+3
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Improve support for loose matches.Raphaël Barrois2012-05-171-3/+14
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add __contains__ to Spec.Raphaël Barrois2012-05-162-0/+24
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* s/SemanticVersion/Version/Raphaël Barrois2012-05-154-19/+19
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Add django fields for SemanticVersion and Spec.Raphaël Barrois2012-05-153-0/+133
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Add support for unittest2.Raphaël Barrois2012-05-151-1/+5
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Rename 'RequirementSpec' to 'Spec'.Raphaël Barrois2012-05-151-4/+4
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
* Full coverage.Raphaël Barrois2012-05-153-3/+42
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Make test modules runable.Raphaël Barrois2012-05-153-0/+3
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* More tests.Raphaël Barrois2012-05-151-0/+130
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* More tests.Raphaël Barrois2012-05-141-0/+67
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Cleanup test importer.Raphaël Barrois2012-05-141-4/+0
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Fix test runningRaphaël Barrois2012-05-141-0/+4
| | | | Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
* Initial versionRaphaël Barrois2012-05-142-0/+64
Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>