powerline/tests
Carl Smedstad 8484023b7b
Fix Python deprecations (#2262)
* Add missing import 'types'

The commit 6950c04614d0bd1fc9c61b79ec7e2be0d16abdc4 did the following,
but missed to import the 'types' module:

-    module = imp.new_module(name)
+    module = types.ModuleType(name)

* Remove usage of 'imp' module - removed in Python 3.12

* Remove usage of deprecated method locale.getdefaultlocale()

Fixes the following deprecation warning:

powerline/lib/encoding.py:49: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
  or locale.getdefaultlocale()[1]

* Fix invalid escape sequences

Specifically:

    powerline/bindings/config.py:179: SyntaxWarning: invalid escape sequence '\$'
    powerline/lint/__init__.py:208: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/__init__.py:226: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/__init__.py:44: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/spec.py:24: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/spec.py:588: SyntaxWarning: invalid escape sequence '\w'
    powerline/segments/common/mail.py:36: SyntaxWarning: invalid escape sequence '\d'
2024-08-29 20:00:48 +09:00
..
modules Fix Python deprecations (#2262) 2024-08-29 20:00:48 +09:00
shlib Fix #2027 - Use `command -v` instead of which 2019-10-09 23:40:13 -05:00
terminfo/s Use st-256color terminal for tests 2015-01-18 05:15:47 +03:00
test_awesome Fix #2027 - Use `command -v` instead of which 2019-10-09 23:40:13 -05:00
test_bar Addressing #2027 gradually - use command -v 2019-10-09 21:51:36 -05:00
test_daemon Only enable tracing for “final” suites: suites not having subsuites 2018-02-25 22:16:05 +03:00
test_in_vterm Fix #2027 - Use `command -v` instead of which 2019-10-09 23:40:13 -05:00
test_lint Only enable tracing for “final” suites: suites not having subsuites 2018-02-25 22:16:05 +03:00
test_python Fix Python deprecations (#2262) 2024-08-29 20:00:48 +09:00
test_shells Emulate a right prompt in bash (#2148) 2021-01-06 18:20:15 +09:00
test_vim fix! Allow failing old vim test when running with Python-2.7 2018-08-12 22:10:15 +03:00
vim_sys_path Move Python tests.* modules to tests/modules, rename tests/path 2017-04-30 16:02:04 +03:00
__init__.py Move Python tests.* modules to tests/modules, rename tests/path 2017-04-30 16:02:04 +03:00
install.sh Use verboser installation, check for installed powerline 2017-12-02 17:56:45 +03:00
test.sh Addressing #2027 gradually - use command -v 2019-10-09 21:51:36 -05:00