summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [fix] metaclass conflict for class_deprecatedLaurent Peuch2020-05-071-0/+11
| | | | Actually the old compatibility code actually prevented this bug so back it up.
* [deprecation] 'moved' function renamed 'callable_moved'Laurent Peuch2020-04-301-1/+1
|
* [deprecation] 'deprecated' function renamed 'callable_deprecated'Laurent Peuch2020-04-301-4/+4
|
* [deprecation] 'renamed' function renamed to 'callable_renamed'Laurent Peuch2020-04-301-2/+2
|
* [deprecation] use send_warning in attribute/argument_renamed, ↵Laurent Peuch2020-04-231-3/+3
| | | | argument_removed and DeprecationWrapper
* [deprecation/refactoring] remove totally overkill DeprecationManagerLaurent Peuch2020-04-231-60/+0
|
* [deprecation/refactoring] simplify class_movedLaurent Peuch2020-04-231-0/+17
|
* [deprecation/refactoring] simplify class_renamedLaurent Peuch2020-04-231-0/+10
|
* [deprecation/refactoring] simplify renamedLaurent Peuch2020-04-221-1/+1
|
* [deprecation/refactoring] simplify movedLaurent Peuch2020-04-221-1/+1
|
* [deprecation/refactoring] simplify deprecatedLaurent Peuch2020-04-223-4/+4
|
* [deprecation/refactoring] start simplifying module and simplify class_deprecatedLaurent Peuch2020-04-221-1/+1
|
* add deprecation.argument_removedLaurent Peuch2020-04-231-0/+11
|
* add depreciation.argument_renamedLaurent Peuch2020-04-161-0/+14
|
* add depreciation.attribute_renamedLaurent Peuch2020-04-161-0/+22
|
* add depreciation.renamed to rename callableLaurent Peuch2020-04-151-0/+10
|
* [shellutils, fix] Deprecate 'input' as argument of RawInput in favor of ↵Simon Chabot2019-11-281-0/+7
| | | | | | | | | | | | | | | | | | 'input_function' When no parameter was given to the class, None was used as the `input`. It used to work because when `input` (the argument) was None `raw_input` of six was used instead. (-> self._input = input or raw_input). Now that six has been dropped, we cannot have `input=None` in the arguments list anymore and use the builtin `input` at the same time. This patch suggests to deprecate this argument in favor of a new one called `input_function`. If no `input_function`, let's use the `input` builtin. For backward compatibility, if `input` should be given, it's caught in the `kwargs` and used as `input_function`, and a deprecation warning is shown.
* Fix modutils tests in debian packagePhilippe Pepiot2019-11-271-0/+1
| | | | | | | | | | | logilab-pytest has a side effect of printing DeprecationWarnings by default, when running modutils tests without logilab-pytest binary this fail. In debian package we run python3 -m "logilab.common.pytest" and thus DeprecationWarning are not displayed and tests fail. Fix this by ensuring DeprecationWarning are displayed before running tests of unittest_modutils.py
* Drop dependency on sixNicola Spanti2019-11-191-3/+1
|
* Nearly drop dependency on sixPhilippe Pepiot2019-11-086-23/+9
|
* [py] Make flake8 a bit less angryNicola Spanti2019-10-251-7/+15
|
* Raise a ValueError in case of invalid unit in textutils.apply_units()Denis Laxalde2019-07-261-0/+3
| | | | | | | | | The original KeyError comes from 57e242dffe89 which no justification. I believe it was meant to be a ValueError as in other errors in this function. Also, _ensure_correctly_typed() in cubicweb/web/formfields.py will catch ValueError. Adding a test for this.
* [configuration] fix registration of multiple groups at onceAdrien Di Mascio2017-05-111-0/+16
| | | | | | | | The "options" iteration variable hid the original function parameters, therefore only the options of the last group were registered. Rename the iteration variable and everything's fine.
* Use a context manager for io.open()Denis Laxalde2017-07-041-1/+2
|
* Use io.open() to avoid deprecation warning about 'U' modeDenis Laxalde2017-07-041-1/+2
| | | | | | Use io.open() which has a consistent interface between Python 2 and Python 3. In particular, `newline` parameter is meant to control "universal new lines" and it is None by default so we don't need to specify it.
* [textutils] Add two more manual mappings to convert unicode into ASCIIYann Voté2017-02-281-0/+2
|
* [registry] RegistrableInstance should be instantiated with __module__=__name__Philippe Pepiot2017-01-202-3/+8
| | | | | | | | | To detect in whih module the instance was created we previously detect the filename in python stack and then use modpath_from_file(). Since the later is now deprecated, we should force passing the module at instantiation with __module__=__name__. Deprecate old usage
* [registry] deprecate register_objects()Philippe Pepiot2017-01-201-2/+6
| | | | | This method is to be replaced by register_modnames() to avoid using deprecated modpath_from_file()
* [modutils] deprecate modpath_from_filePhilippe Pepiot2017-01-201-2/+6
| | | | | | The method will likely fail if there somes symlinks in your python environment and will certainly fail on a file that isn't in sys.path (like custom importers using sys.meta_path).
* [registry] add register_modnames()Philippe Pepiot2016-12-231-0/+9
| | | | | | Alternative to register_objects() to inspect modules names instead of directories. Avoiding using bogus logilab.common.modutils.modpath_from_file()
* [test] Do not use "modutils" in test_site_packagesDenis Laxalde2016-11-181-2/+3
| | | | | | Because "modutils" module may also be found in source directory, this test may fail under some circumstances (like Debian package build, for instance).
* [configuration] Fix multi-line strings handlingChristophe de Vienne2016-01-111-0/+44
| | | | Closes #3691182
* [testlib] Deprecate doctest things in favour of stdlib moduleDenis Laxalde2016-01-193-20/+18
| | | | | | And adjust all tests accordingly. Drop docstring example from fileutils.abspath_listdir since I could not have it skipped.
* Rename pytest executable into logilab-pytestDenis Laxalde2016-10-031-1/+1
| | | | Closes #8396846.
* [test] noop instead of skip test_utcdatetime for mxDateTimeDavid Douard2016-05-271-1/+1
| | | | to have a clean CI report
* [pep8] test/unittest_changelogDavid Douard2016-05-271-6/+7
|
* [changelog] ensure ChangeLogEntry write unicode (closes #6213577)David Douard2016-01-121-1/+1
| | | | also use io.StingIO in unittest_changelog
* Fix regression with datetime2ticks vs date object as argumentSylvain Thénault2016-05-171-0/+5
| | | | we should not get a traceback in this case. Closes #6060938
* [date] take milliseconds into account in datetime2ticksJulien Cristau2016-03-101-3/+11
|
* Move coverage utility from pytest to testlibDenis Laxalde2016-03-031-15/+0
| | | | | | | This allows client libraries to avoid importing pytest module which has spurious monkeypatches of unittest. Drop deprecated API about coverage control.
* [optik_ext] Bytes should be returned as ints, not floats (closes #2086835)Rémi Cardona2015-10-121-0/+19
| | | | float is the default type used in apply_units.
* [umessage] Use the same code paths for both python 2 and 3Rémi Cardona2015-09-211-1/+18
| | | | | Add tests for UMessage.get_payload() (taken from CubicWeb). Closes #1716128.
* [umessage] Work around bug in python 3's decode_headerRémi Cardona2015-09-181-0/+12
| | | | | | | | We sometimes get unicode objects out of that function, on which .decode() obviously fails. Upstream has apparently not to fix the existing function, so let's handle it ourselves. Tests are taken from CubicWeb. Related to #1716128.
* [tests] Fix resource leakRémi Cardona2015-09-101-2/+4
|
* [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.