summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [tests] Stop using deprecated assert_Rémi Cardona2015-09-101-1/+1
|
* [testlib] Allow skipTest() and fail() in generative testsRémi Cardona2015-09-101-0/+25
| | | | Closes #1716420.
* [shellutils] Remove racy file lockRémi Cardona2015-09-101-41/+3
| | | | | | acquire_lock is racy on Unix (TOCTOU) and broken on Windows (lock file is removed instantly since ProcInfo always raises NoSuchProcess on this OS).
* [testlib] Remove deprecated assert methodsRémi Cardona2015-09-101-48/+0
| | | | | Including those that are already defined in unittest2 >= 0.5.1. Closes #1716063.
* [configuration] Have a stable order for sections (closes #298658)Rémi Cardona2015-07-231-3/+30
| | | | | | Useful when generating a default configuration file, like pylint's. Fix provided by Craig Hobbs <craigahobbs@gmail.com>
* [test] Fix modutils tests when running inside a python 3 virtualenv (closes ↵Rémi Cardona2015-06-291-2/+5
| | | | | | | | | | | | | | | | | #294756) Virtualenv symlinks a bunch of stdlib modules which confuse modutils.is_standard_module. The better way would obviously be to fix modutils to properly detect virtualenvs, but life is too short. As for why virtualenv actually needs to symlink a good chunk of the stdlib, anyone's guess is as good as mine. Here's the upstream commit that added hashlib.py to the list of needed symlinks: https://github.com/pypa/virtualenv/commit/10ba3f3cc0d7a254dd72e2bb9557006da2f85e00#diff-7e83770aa980bd4327db90f4eafeffdfR126 And for the record, 'venv' (the virtualenv-lookalike shipped since python 3.3) does not do _any_ symlink to stdlib modules.
* [test] remove check for python < 2.6Rémi Cardona2015-06-291-1/+1
| | | | | Unsupported since the very first few commits of the 0.63.0 release (38c568b29cf3 to be precise).
* [test] run TagsTC.test_tagged_class on python 3Rémi Cardona2015-06-251-3/+0
| | | | Closes #105845.
* [test] instantiate TestCase before calling runner.does_match_tagsRémi Cardona2015-06-251-19/+19
| | | | | | | | | Python 3 no longer has the concept of unbound methods, so we can't get from the method to the class defining it. This is only an issue in the test, not in actual usage, because does_match_tags should only ever deal with instantiated TestCases. Related to #105845
* [test] Rework generate_manpage test to use a private __pkginfo__Rémi Cardona2015-06-242-2/+62
| | | | | Stop using lgc's own __pkginfo__ (which we may stop shipping/installing at some point).
* Fix python3 syntax errorsJulien Cristau2014-11-285-34/+20
| | | | Closes #278550
* [date] Fix utcdatetimeChristophe de Vienne2014-11-271-1/+22
| | | | | | | | Dates with a tzinfo get messed up by utcdatetime. The unittest in this patch depends on pytz. Closes #280794
* [coverage] Provides better tools to pause tracingChristophe de Vienne2014-11-271-0/+51
| | | | | | | The former implementation was not restoring properly the trace function on python 2.7 at least. This cleaner implementation uses context-manager, and deprecates the pause_tracing/resume_tracing couple. Closes #280757
* [ureports] write unicode not bytes (closes #277372)Julien Cristau2014-11-281-14/+23
|
* Only read/write func.__name__ and class.__self__Rémi Cardona2014-07-171-3/+0
| | | | | | | | | | | | Since at least python 2.0, func_name and __name__ point to the same struct member and since 2.4, they share the exact same getter and setter. Since __name__ is the only property left in python 3.0, let's use that one. As for method.__self__, it has been available since at least python 2.0 too.
* [py3k] Replace uses of 'unicode'Rémi Cardona2014-07-171-4/+6
|
* [py3k] explicitly build a list around dict methodsJulien Cristau2014-07-272-2/+2
| | | | | When we modify the return value from one of the dict methods, explicitly build a list from it to make things work on python3. Related to #265740.
* [py3k] Use metaclasses using six.add_metaclassRémi Cardona2014-07-191-4/+8
|
* [py3k] import StringIO from compatRémi Cardona2014-07-186-7/+6
|
* Consistently use the generator version of rangeRémi Cardona2014-09-221-0/+2
| | | | That way we get the same behavior on python2 and python3.
* [py3k] Import range from six.movesRémi Cardona2014-07-162-17/+21
|
* [py3k] print functionRémi Cardona2014-09-172-7/+10
| | | | Requires python >= 2.6.
* [test] replace assertTrue(a == b) with assertEqual(a, b)Julien Cristau2014-09-081-8/+8
|
* Use next(iterator) instead of py3k incompatible iterator.next() (related to ↵Rémi Cardona2014-07-162-6/+6
| | | | | | #264017) Requires python >= 2.6.
* Use "except as" syntax (related to #264017)Rémi Cardona2014-07-161-1/+1
| | | | Requires python >= 2.6.
* [compat] Deprecate any() and all() (related to #264017)Rémi Cardona2014-07-281-120/+0
| | | | They're builtin since python 2.5, so we can remove our implementation.
* Remove obsolete __future__ imports (related to #264017)Rémi Cardona2014-07-282-2/+0
| | | | Generators have been available since 2.3, "with" statements since 2.6.
* Remove CVS file IDsRémi Cardona2014-07-286-6/+0
|
* [configuration] closes #185648 : load options in config file orderLaura Médioni2014-07-251-2/+43
| | | | | | Option should be processed in file order, not declaration order. related to issue #87 on pylint : https://bitbucket.org/logilab/pylint/issue/87
* [test] Fix broken unittest_configuration.py:ConfigurationTC.test_round_tripAnthony Truchet2013-10-251-8/+13
|
* [date] Fixed: wrong incrementation of month in date_range function (closes ↵Damien Garaud2013-10-311-0/+7
| | | | | | #186698). Add a unit test.
* backport stable branchSylvain Th?nault2013-07-262-12/+14
|\
| * testlib: fix for python 3.3Julien Cristau2013-07-221-6/+6
| | | | | | | | | | | | unittest.TestCase no longer has a assertSameElements method. Use assertCountEqual instead of assertSameElements/assertItemsEqual. Closes #144526
| * [modutils test] enhance some test namesSylvain Th?nault2013-05-071-6/+8
| |
* | [configuration] make it clear there are constants used in the testsNicolas Chauvat2013-05-241-3/+3
| | | | | | | | rename options to OPTIONS
* | [configuration] add test case for merge_options()Nicolas Chauvat2013-05-211-1/+21
| |
* | [configuration] fix wording in test nameNicolas Chauvat2013-05-211-1/+1
| |
* | backport stableSylvain Th?nault2013-04-291-0/+61
|\ \ | |/ |/|
| * Add version handling to the deprecation module (closes #108205).Damien Garaud2013-04-111-0/+61
| | | | | | | | | | | | | | | | Allow to refine the deprecation message handling. Messages are dropped for versions more recent than the 'compatible' version. Implement the `deprecated` decorator and `class_deprecated` metaclass in terms of this new manager.
* | [modutils test] simplify test names and add border cases test for ↵Sylvain Th?nault2013-04-111-6/+16
|/ | | | is_standard_module
* fix umessages test w/ python 3 and LC_ALL=C (closes #119967)Sylvain Th?nault2013-02-151-2/+8
|
* [testlib] check for generators in with_tempdirJulien Cristau2013-02-221-0/+11
| | | | | | | | If the decorated callable is a generator, we shouldn't reset tempfile.tempdir until the end of the iteration. Hopefully nobody uses this with nested/chained generators, or they'd stomp all over each other's tempdirs. Closes #117533
* Properly fix @monkeypatch by changing its contract. Actually closes #104047logilab-common-version-0.59.0Sylvain Th?nault2013-01-211-15/+17
| | | | | This follows 8d13747da834 and f8fb4a6d9249 which should not have been commited before this cleanup.
* [merge] default is stableAurelien Campeas2013-01-214-6/+90
|\
| * [registry] introduce RegistrableObject and RegistrableInstance base classes. ↵Sylvain Th?nault2013-01-143-2/+72
| | | | | | | | | | | | | | | | | | | | Closes #98742 and make them mandatory *for automatic registration*. Cleanup automatic registration code accordingly. Instances are now registrable, and automatically registered provided they inherit from RegistrableInstance.
| * [test, deprecation] update tests so we actually test somethingSylvain Th?nault2012-11-301-4/+18
| |
* | py3k cached wipSylvain Th?nault2012-10-231-13/+13
| |
* | [py3k @cached] fix compat of dark corners for the @monkeypatch decorator, ↵Sylvain Th?nault2012-10-231-2/+10
|/ | | | making tests pass. Closes #104047
* [decorators test] use assertIsInstance as expectedSylvain Th?nault2012-10-231-2/+2
|
* python3: fix code and test so most tests go green. Partially closes #104047Sylvain Th?nault2012-10-234-8/+13
| | | | | the only failing test concerns the @monkeypatch decorator and fix is subject to controversy, so post-pone it so we may discuss about it.