summaryrefslogtreecommitdiff
path: root/urwid/tests/test_floatedit.py
Commit message (Collapse)AuthorAgeFilesLines
* Python 37+ initial migration (#522)Alexey Stepanov2023-03-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial migration to the python 3.7: Semi-automatic changes CI related: Update `tox.ini` and `.travis.yml` to run python3 only tests Python 3.11 tests is commented-out on travis until #517 is not merged Manual changes: * `setup.py`: classifiers, remove python2 compatibility code * `docs/manual/wcur2.py`: looks like file was never completed, syntax is invalid * `urwid.compat`: removed `ord2`, `bytes3`, `text_type`, `xrange` and `text_types` Automatic changes (no manual editing, AST validated equality: * removed `u` prefix from all strings: not allowed in modern python code * `bytes()` -> `b''` * `== None` -> `is None` * subclassing of `object` * `super(<Class>`, self>)` ->`super()` * `from __future__ import ...` python3 compatibility imports * `set(<Iterable[Hashable]>)` -> `{<Hashable>}` * partial f-strings conversion * (`IOError`, `select.error`, `socket.error`) -> `OSError` * Switch to f-strings (automatic changes) * Remove `urwid.compat.B` * Remove `urwid.compat.with_metaclass` * use native `super()` instead of `self.__super` * Remove `urwid.compat.chr2` * Remove `urwid.split_repr.python3_repr` * Use native `@classmethod` and `@property` where overload is not possible * Add `from __future__ import annotations` * automatically sort imports * Add DeprecationWarning to the deprecated methods most IDE's will recognize it and annotate during new code usage call with "warnings as errors" mode will help to refactor other users * Address comments * replace homepage address in all files * remove outdated comments in compat.py * make wcur2.py correct python code. For example subclass * replace `self.__super` by `super()` in examples * fix asyncio_socket_server.py: magic with `asyncio` became wrong * Remove `widget.update_wrapper`: this was backport of python `functools.update_wrapper` * display_common.py: fix trivial typo in _colors calculation * use `sorted` method instead of list construction with later sorting * Address comments * `wcur2` include in docs * warning on `signals.Signals.emit` --------- Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
* Test fixes (#524)Alexey Stepanov2023-03-291-7/+27
| | | | | | | | | | | | | | | | * asyncio coroutine was not awaited, so test was false-positive (poor visible on Travis CI) Fix test. * FloatEdit unittests passed, incorrect output doctests not caused exception on CI * warnings on version number * warnings about deprecated setup.py usage for tests run * python2.7 is not able to execute tests for asyncio due to mandatory syntax changes (async def). Fix logic: 1. added `isinstance` check before getting significance 2. Fix FloatEdit and add corner case tests 3. normalize version number 4. execute tests via `unittest` 5. stop using python 2.7 in tests run instead of increasing complexity Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
* Resolve #499 and add tests (#500)Daniel Sheffield2023-03-281-0/+21
Resolves #499 - FloatEdit mangles decimals