[tests] Add specific tests for CPU module
* Check that the left mouse button action works * Check that the format is OK see #23
This commit is contained in:
parent
e72c25b0bc
commit
9ce7739efb
3 changed files with 74 additions and 30 deletions
|
@ -1,11 +1,21 @@
|
|||
# pylint: disable=C0103,C0111,W0613
|
||||
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
from bumblebee.output import Widget
|
||||
|
||||
def assertWidgetAttributes(test, widget):
|
||||
test.assertTrue(isinstance(widget, Widget))
|
||||
test.assertTrue(hasattr(widget, "full_text"))
|
||||
|
||||
def assertPopen(output, cmd):
|
||||
res = shlex.split(cmd)
|
||||
output.assert_called_with(res,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT
|
||||
)
|
||||
|
||||
class MockInput(object):
|
||||
def start(self):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue