summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* style(black): new black release changed a bunch of stuffLaurent Peuch2020-08-264-47/+29
|
* fix(deprecation): stacked decorators breaks getting the real callable ↵Laurent Peuch2020-08-261-0/+25
| | | | __name__ attribute
* [deprecation/fix] implement lazy_wraps, a lazy version of functools.wraps ↵Laurent Peuch2020-05-201-0/+15
| | | | | | | | | | | for LazyObject functools.wraps was breaking the behavior of LazyObject because it tried to access attributes of the LazyObject that triggers an import which could sometime fails in this situation where some modules are marked as deprecated but aren't imported yet. For example see https://forge.extranet.logilab.fr/cubicweb/cubicweb/blob/3.24.0/cubicweb/schemas/__init__.py#L51
* [fix] metaclass conflict for class_deprecatedLaurent Peuch2020-05-071-0/+11
| | | | Actually the old compatibility code actually prevented this bug so back it up.
* black && flake8Laurent Peuch2020-05-063-107/+153
|
* [deprecation/fix] correctly automatically get the module in which ↵Laurent Peuch2020-05-063-40/+84
| | | | | | | | | | | | deprecation utils are called There was a missmatched combination of: * the frame wasn't always correctly grabbed * grabbing the frame in the situation of a decorator didn't make any sens, so switch to func.__module__ * the tests were bad and expected "[logilab.common]" while it should have been "[test_deprecation]" because it was there that the depreciation was declared
* Please the flake8 godLaurent Peuch2020-03-1917-55/+99
|
* Black the whole code baseLaurent Peuch2020-04-0130-1115/+1581
|
* [tox] move to pytestLaurent Peuch2020-03-2022-3/+3
|
* [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.