Tobias Witek
682d2f47dd
[core/theme] State == "" causes backtraces
...
Empty states ("" rather than None) caused a backtrace in the theme
engine. Fix that by being a bit more robust, and add a test that checks
for regressions.
fixes #406
2019-07-02 20:19:26 +02:00
Tobias Witek
928c37a972
[core+tests] Improved poll handling
...
- mock poll instead of epoll
- increase timeout for poll (1ms is a lot of system load for nothing)
2019-06-23 16:51:28 +02:00
Frank Scherrer
a6eb5a43a5
fix code for flake8 linter
2018-09-04 10:04:18 +02:00
Frank Scherrer
a52c3e8e12
add further tests for which
...
* test which for always present binary "ls"
* test which for garbage input
2018-09-04 09:58:52 +02:00
Frank Scherrer
872c2047e5
add test for util.which
...
* and make runtests.sh dash-compatible for debian-like OS
2018-08-28 14:52:17 +02:00
Tobias Witek
be8669270e
[tests] Removed memory test, as psutil is not used anymore
...
mocking psutil doesn't bring much to the table now...
2017-09-20 06:28:47 +02:00
Tobias Witek
115f03cb0f
[module/battery] Add remaining time, if available
...
Add remaining time directly to widget, if available, and if not on
charge.
see #146
2017-07-26 16:41:30 +02:00
Frederic Junod
37434aa5e5
[module/memory] Add new format string parameter
2017-07-15 09:48:23 +02:00
Tobias Witek
e5061b4d5f
[tests/brightness] Disable failing test
...
Honestly: I don't know why Travis is failing on this test, it works fine
on my machine with Python 2.7. Therefore, I will disable this test until
I can get to the bottom of it.
2017-06-26 20:42:33 +02:00
Tobias Witek
fd7c5f6f0b
[tests/brightness] Create open call, if it does not exist
...
Hopefully, this fixes the failing Travis build.
2017-06-26 20:33:06 +02:00
Tobias Witek
d37218ce4a
[tests/brightness] Fix FileNotFoundError for Python 2.7
2017-06-26 19:10:51 +02:00
jmg5e
fc912a8fbc
fixed tests for brightness module
2017-06-26 06:07:19 -05:00
Tobias Witek
d69f13f0b4
[modules/battery] Autodetect battery devices
...
The module now creates a widget for each battery device it detects and
shows the status for each of them (I don't know of anyone with more than
a single battery, but if I'm overhauling the module anyhow, might as
well do it comprehensively).
fixes #117
2017-06-18 11:35:06 +02:00
Tobias Witek
c7e2f39132
[tests/cpu] Fix expectation for CPU module output
2017-06-15 14:06:45 +02:00
Tobias Witek
c75ad75920
[tests/module/disk] Adapt to new input parameters
...
Open application now defaults to xdg-open, replace with nautilus
manually.
2017-06-01 19:57:50 +02:00
Tobias Witek
94c72a1e6a
[tests] Fix failing test for i3bar protocol
2017-04-26 07:50:27 +02:00
Tobias Witek
59fc835b88
[tests] Fix broken cmus test
...
Adding scrollable output broke the cmus test.
2017-04-22 13:17:09 +02:00
Tobias Witek
0f34826cac
[tests] Fix broken tests caused by new theme methods
...
Add "minwidth()" and "align()" mocks for i3bar output tests.
2017-04-22 13:14:52 +02:00
Tobi-wan Kenobi
bb2ed63528
[test/disk] Fix unit test for disk module
2017-03-10 08:26:33 +01:00
Tobi-wan Kenobi
935b50a23b
[tests] Maybe patching the platform call fixes the issue with Travis
2017-03-05 14:18:34 +01:00
Tobi-wan Kenobi
11c68310bb
[tests] generic modules tests don't work on Travis
...
Maybe this fixes it...
2017-03-05 14:08:26 +01:00
Tobi-wan Kenobi
a47860e73c
[tests] Add unit tests for pulseaudio module
2017-03-05 14:02:11 +01:00
Tobi-wan Kenobi
e59a870a1e
[tests] Add unit tests for memory module
2017-03-05 13:58:15 +01:00
Tobi-wan Kenobi
e07a889393
[tests/cpu] Cleaned up unnecessary import
2017-03-05 13:49:52 +01:00
Tobi-wan Kenobi
be01980afe
[tests] Add unit tests for disk module
2017-03-05 13:49:45 +01:00
Tobi-wan Kenobi
826c568625
[tests] Add generic module tests
...
These tests check that all widgets of all modules conform to some basic
principles, at least.
2017-03-05 13:30:10 +01:00
Tobi-wan Kenobi
f9984ba386
[tests] Add unit tests for load module
2017-03-05 13:16:13 +01:00
Tobi-wan Kenobi
c7621caf78
[tests] Add unit tests for the store class
2017-03-05 13:04:20 +01:00
Tobi-wan Kenobi
00849aa4fa
[tests] Refactor setting up complex I/O mocking for modules
...
Modules now only have to have a single setup/teardown line in their code
to fully set up the I/O part of a test.
2017-03-05 13:01:28 +01:00
Tobi-wan Kenobi
69dceca7d0
[tests/cpu] Add unit tests for module cpu
2017-03-05 12:30:37 +01:00
Tobi-wan Kenobi
46977f4d36
[tests/cmus] Add unit tests for cmus module
2017-03-05 12:15:29 +01:00
Tobi-wan Kenobi
939d9851bd
[tests/brightness] Remove unused import
2017-03-05 12:15:13 +01:00
Tobi-wan Kenobi
e6d44e7898
[tests/caffeine] Add unit tests for caffeine
2017-03-05 11:48:33 +01:00
Tobi-wan Kenobi
aaaf62673d
[tests/brightness] Remove unneeded mock for stdout
2017-03-05 11:48:19 +01:00
Tobi-wan Kenobi
36848770a5
[tests] Add unit tests for brightness module
2017-03-05 11:24:30 +01:00
Tobi-wan Kenobi
463850eddc
[tests/battery] Add unused variables
2017-03-05 11:24:11 +01:00
Tobi-wan Kenobi
ce22e9dc75
[tests] remove accidentially committed backup module
2017-03-05 11:23:52 +01:00
Tobi-wan Kenobi
1217aa1f60
[tests/battery] Try to fix failing CI tests
2017-03-05 10:39:08 +01:00
Tobi-wan Kenobi
e4f728327e
[tests] Fix imports for Python3 compatibility
2017-03-05 09:40:15 +01:00
Tobi-wan Kenobi
30f3c898ed
[tests] Do not use string.lowercase, as Python3 complains about it
2017-03-05 09:37:59 +01:00
Tobi-wan Kenobi
8724af2906
[tests/battery] Add tests for battery module
2017-03-05 09:35:56 +01:00
Tobi-wan Kenobi
728cb73189
[test_i3bar-output] Added i3bar output test modules
2017-03-05 09:34:47 +01:00
Tobi-wan Kenobi
70f138b97b
[tests/i3bar-input] Add input tests for i3bar protocol
...
Also, replaced the MockModule with a generic mock object.
2017-03-05 08:35:15 +01:00
Tobi-wan Kenobi
cdbddcfff7
[tests/i3bar-input] Add tests for i3bar input processing
2017-03-05 07:56:10 +01:00
Tobi-wan Kenobi
90dd636b43
[tests/engine] Add test for module aliasing
2017-03-04 18:53:31 +01:00
Tobi-wan Kenobi
6a14681a65
[tests/theme] Add tests for theme.py
2017-03-04 14:17:27 +01:00
Tobi-wan Kenobi
64523119af
[tests] Added engine and module tests
...
Added those two unit tests together, as they are tightly linked together
anyhow.
2017-03-04 13:44:51 +01:00
Tobi-wan Kenobi
f65ab6bcae
[tests/config] Add unit tests for config.py
2017-03-04 12:11:43 +01:00
Tobi-wan Kenobi
f0013c7581
[tests/util] Add test for execute with wait=False
2017-03-04 11:35:46 +01:00
Tobi-wan Kenobi
6dbe440cb5
[tests] Purge tests and start with a clean implementation of subprocess
...
Seems like subprocess and friends (Popen, communicate) are not so easy
to mock cleanly. Therefore, start from scratch and carefully write test
by test, until (at least) the old test coverage has been restored.
2017-03-04 11:25:52 +01:00