Commit Graph

670 Commits

Author SHA1 Message Date
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
Philip Wellnitz [10] 6b36ba8ae9 fix #2257 2024-05-12 04:45:27 +09:00
Robin Candau c04a8dd5a1
Remove imp module from tests to make them compatible with python 3.12 (#2251) 2024-02-27 18:59:10 +09:00
Philip Wellnitz 7310d53ade
i3 segments rework (#2159)
rework i3wm segments
2021-03-15 03:45:17 +09:00
sol 1869cc8bed
Use updated i3ipc syntax in i3 segments/listers (#2062)
Close #2046

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
2021-01-08 19:25:53 +09:00
Cédric Schieli c31f83f831
Emulate a right prompt in bash (#2148)
* Allow passing args from render() to hl() and hlstyle() functions

* New escape arg in ShellRenderer's hlstyle() to enable/disable escaping

* Fix invalid escape sequence

* Emulate a right prompt in bash

Fixes #2103

* Document the new hl_args argument
2021-01-06 18:20:15 +09:00
StopMotionCuber a6060c760a
Fix non-meaningful venv names. (#2134)
* Add feature to ignore certain virtualenv names

* Add tests for testing ignored names (specific as well as default)

* Don't use `zsh.environ` as this does not stringify the environment
2020-10-27 21:50:36 +09:00
StopMotionCuber a80bbdf17d
Updated uptime segment to have show time in a better way (#2036)
* Updated uptime segment to have show time in a better way

* Made current solution backwards compatible

* Include proposed change for proper uptime support

* Updated tests to reflect new default values for uptime
2020-10-06 04:32:36 +09:00
StopMotionCuber 73881c1dce
Shifted away from (abandoned) Yahoo API to OpenWeatherMap (#2038)
* Shifted away from (abandoned) Yahoo API to OpenWeatherMap
* Calculate gradient based on converted temperature
* Added Stubs for https://freegeoip.app as well as https://api.openweathermap.com
* Updated tests for weather segment with OpenWeatherMap mocking
* Make Weather API key configurable
* Added documentation for the OpenWeatherMap API keys
2020-09-19 14:31:49 +09:00
Philip Wellnitz 59a5425597
Add timezone argument to date and fuzzy_time segments (#2097)
* add basic timezone support
2020-05-26 20:08:44 +09:00
Torstein Husebø 15c611ca46 doc: installation, fix typo (#2041)
* doc: installation, fix typo

* Fix a lot of documentation/comment typos
2019-11-03 04:29:20 +09:00
BK Bolisetty af557ae60c Reverting test_shells to use `which` 2019-10-11 15:15:28 -05:00
BK Bolisetty f9937ab922 Fix #2027 - Use `command -v` instead of which 2019-10-09 23:40:13 -05:00
BK Bolisetty ef6c9b435c Addressing #2027 gradually - use command -v
Currently only changed tests/test.sh and tests/test_bar/test.sh .
2019-10-09 21:51:36 -05:00
Philip Wellnitz 6569cc6cfd disable unstable network_load segment test 2019-10-08 16:05:45 +09:00
Philip Wellnitz f9ce8201c4
Fix #1953 (#1997)
* ipython fix

* ipython fix

* ipython fix

* fix ipython startup

* better fix for nbsp

* ipython7: fix attributes

* Change ipythen tests to use new binding

* ipython test: use proper config
2019-10-08 03:29:43 +09:00
Philip Wellnitz bc33b1ce31
fix #1969 (#2026) 2019-09-27 14:33:24 +02:00
sol 2428f78ea4 support vertically-aligned multi-monitor setups in lemonbar (#1982)
* support vertically-aligned multi-monitor setups in lemonbar

* Fix expected args in lemonbar test
2019-09-26 08:57:56 +02:00
Philip Wellnitz 25737d90eb Disable vterm tests to check ci 2019-09-23 20:14:19 +09:00
Rijnard van Tonder e64ce9bd1a
Fix duplicate conditional check 2018-11-09 22:16:02 -05:00
Foo a92bc72801 fix! Allow failing old vim test when running with Python-2.7 2018-08-12 22:10:15 +03:00
Foo 3c4ec09281 Do not set -x, it fails some tests and makes some output not readable 2018-02-25 22:36:52 +03:00
Foo d27961f0b0 Unset POWERLINE_SUITE_FINAL if exit_suite is continuing 2018-02-25 22:35:11 +03:00
Foo 2fc0e8e520 Use proper $PYTHON in case of UCS2 build and non-bash script 2018-02-25 22:28:29 +03:00
Foo 4a834f38aa Only enable tracing for “final” suites: suites not having subsuites 2018-02-25 22:16:05 +03:00
Foo 23bec031a4 Do not use python from ~/opt directly
It causes problems with sys.path: interpreter could not use installed packages.
2018-02-25 21:53:24 +03:00
Foo 466ee2e295 Print more detailed diagnostics
Specifically, disable set -x from main.sh, but add nicer print_environ function 
executed before each test suite, also setting `set -x` in `enter_suite`.
2018-02-25 21:37:47 +03:00
Foo 910c6a33dd Define PYTHON and LD_LIBRARY_PATH before sourcing main.sh 2017-12-16 16:28:56 +03:00
Foo f507a6370a Do commit code which is actually using virtualenv 2017-12-02 23:16:17 +03:00
Foo 9d836d70e0 Use virtualenv for tmux and vshells tests as well 2017-12-02 19:25:01 +03:00
Foo cee07a69b1 Always supply verb argument 2017-12-02 19:06:38 +03:00
Foo 2a01c4687e Supply segment_info to powerline.segments.env.user() segment in tests 2017-12-02 18:30:24 +03:00
Foo b558d200fe Only shift if verb was supplied 2017-12-02 18:24:01 +03:00
Foo 1b0df9c2bd Wait for thread to start 2017-12-02 17:56:45 +03:00
Foo 0c594b0b34 Use verboser installation, check for installed powerline 2017-12-02 17:56:45 +03:00
Foo 436b4b680a Rename test_shell.py to test_shells.py 2017-12-02 17:56:43 +03:00
Foo eb17b5374b Add some working dash tests 2017-12-02 17:56:41 +03:00
Foo 870de7be21 Improve terminal.py:
1. Make it print true color escape sequences when debugging.
2. Add support for automatic row detection.
2017-12-02 17:56:37 +03:00
Foo 6bbcb610c7 Make vterm UTF-8 2017-12-02 17:56:36 +03:00
Foo 3fca2f8d02 Add skip command, rename tests/failures to tests/status 2017-12-02 17:56:34 +03:00
Foo 96f9c62d86 Start creating shell vterm tests
Should replace #1448.
2017-12-02 17:56:33 +03:00
Foo 29d0a3c171 Remove “output is not to a terminal” from Vim output 2017-12-02 17:56:31 +03:00
Foo cbea5357a9 Use different character for strwidth tests 2017-12-02 17:56:30 +03:00
Foo eb5834cf3e Move version
I do not actually see this character in diff of EastAsianWidth.txt though, but 
it appears that test with 5.1.0 uses 2 and succeeds, tests with 6.0.0 and 8.0.0 
use 1 and succeed, but test with 5.2.0 uses 2 and fails.
2017-12-02 17:56:28 +03:00
Foo 335be73d3e Check unidata_version to determine width
Did not actually determine whether this check is correct.
2017-12-02 17:56:26 +03:00
Foo b047abcd9a First call suite.fail, then super().fail 2017-12-02 17:56:24 +03:00
Foo 55d9c320dc Add missing import 2017-12-02 17:56:23 +03:00
Foo 0a1cf1780f Use better failure message 2017-12-02 17:56:22 +03:00
Foo f111a95b0d Change width to 1
May make test fail on older Python’s
2017-12-02 17:56:21 +03:00
Foo 2787855008 Disable travis hack
Assuming it is outdated.
2017-12-02 17:56:19 +03:00