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
59fc835b88
[tests] Fix broken cmus test
...
Adding scrollable output broke the cmus test.
2017-04-22 13:17:09 +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
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
f9984ba386
[tests] Add unit tests for load module
2017-03-05 13:16:13 +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
8724af2906
[tests/battery] Add tests for battery module
2017-03-05 09:35:56 +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
Tobi-wan Kenobi
d3fc5094f8
[modules/gpmdp] Make unit tests run through
...
* full_text needs to return a string *always*
* relax full_text check to also allow unicode results
2017-01-02 22:26:57 +01:00
Tobi-wan Kenobi
f6be25bc73
[core/input] Move from select to epoll
...
Use epoll instead of select in order to be able to use level-triggered
semantics and not get stuck on the first event.
2016-12-17 07:43:38 +01:00
Tobi-wan Kenobi
9878bbf971
[tests] Fix automated testrun in Travis
...
Forgot to mock Popen() in setUp
2016-12-11 12:31:37 +01:00
Tobi-wan Kenobi
9fe0915730
[tests] Add mocking for module tests
2016-12-11 12:26:28 +01:00
Tobi-wan Kenobi
71582cbcd7
[modules/ping] Re-enable ping module
...
Show RTT measured by ICMP echo request/replies for a given host.
For that to work correctly, change the "full_text" callback for a widget
so that the widget itself is also passed as argument in the callback
method. That actually makes a lot of sense, since the widget can now be
used as a repository of state information.
see #23
2016-12-11 11:37:24 +01:00
Tobi-wan Kenobi
666daff9a6
[modules/pulseaudio] Re-enable pulseaudio module
...
Display volume for default PulseAudio source/sink, change volume and
mute/unmute device.
see #23
2016-12-11 08:51:56 +01:00
Tobi-wan Kenobi
c2c70da4ef
[tests/disk] Fix copy/paste error - duplicate method name
2016-12-11 08:45:43 +01:00
Tobi-wan Kenobi
e603a2cb26
[tests/battery] Forgot a mock in previous commit
2016-12-11 08:14:55 +01:00
Tobi-wan Kenobi
7db80b6d3b
[tests/battery] Mock exists() call for Travis CI
2016-12-11 08:11:26 +01:00
Tobi-wan Kenobi
c8fc75a401
[modules/load] Re-enable load module
...
Display system load and show warning/critical error when load is above a
certain threshold (compared to the number of available CPUs).
see #23
2016-12-11 08:01:43 +01:00
Tobi-wan Kenobi
716bafa90e
[tests] Fix unit tests (at least on my system)
2016-12-10 19:45:13 +01:00
Tobi-wan Kenobi
2e2351a69e
[tests] Mock Popen() in module tests
2016-12-10 19:35:38 +01:00
Tobi-wan Kenobi
d41c142d4a
[modules/memory] Re-enable memory usage module
...
Add module that shows RAM consumption and opens the gnome-system-monitor
on click.
see #23
2016-12-10 19:20:19 +01:00
Tobi-wan Kenobi
16a4613e57
[tests] Minor refactoring
...
Draw some commonly-used assertion logic into common functions.
see #23
2016-12-10 19:08:29 +01:00
Tobi-wan Kenobi
e15147fe10
[tests/disk] Add critical/warning threshold tests for disk module
...
see #23
2016-12-10 18:49:25 +01:00
Tobi-wan Kenobi
12f5ce5977
[modules/disk] Re-enable disk usage module
...
Add a module that shows the disk usage for various paths and opens
nautilus on that path whenever it is clicked.
see #23
2016-12-10 18:21:01 +01:00
Tobi-wan Kenobi
771c597ce9
[modules/caffeine] Re-implement caffeine module
...
Add caffeine module & add a framework for testing it (no tests yet,
though).
see #23
2016-12-10 15:36:18 +01:00
Tobi-wan Kenobi
163419063d
[tests/battery] Add some tests for the battery module
...
see #23
2016-12-10 14:50:49 +01:00
Tobi-wan Kenobi
1b8385b33f
[modules/brighness] Re-enable brightness module
...
Add a module for reporting, increasing and decreasing the brightness of
a display.
see #23
2016-12-10 14:31:18 +01:00
Tobi-wan Kenobi
029492e16d
[core] Non-blocking input thread for i3bar events
...
Make input thread non-blocking by using select(). This increases the CPU
utilization a bit (depending on the timeout), but makes the thread exit
cleanly, even if an exception is thrown in the main thread.
see #23
2016-12-10 13:45:54 +01:00
Tobi-wan Kenobi
a045962d00
[modules/nic] Re-enable NIC module
...
Re-add the NIC module with all its functionality (hopefully...).
This introduces a new concept: Instead of having separate queries for
critical and warning (which really are just another set of states), a
module can now return a list of states for each widget. All the state
information is then merged together into a single theme. So, for
instance, the NIC module can return a state saying "critical -
wlan-down", which applies the theme information for both "critical" and
"wlan-down".
see #23
2016-12-10 11:25:02 +01:00