This seems to be different behaviour between py.test and nose
nosetests problably switched to the current tests directory before executing them.
This commit is contained in:
parent
95718c27a8
commit
6cdbcc8ede
@ -1,12 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import unittest
|
import os.path
|
||||||
|
|
||||||
from i3pystatus import battery
|
from i3pystatus import battery
|
||||||
|
|
||||||
|
|
||||||
def battery_test(path, format, expected):
|
def battery_test(path, format, expected):
|
||||||
bc = battery.BatteryChecker(path=path, format=format)
|
bc = battery.BatteryChecker(path=os.path.dirname(__file__) + "/" + path, format=format)
|
||||||
bc.run()
|
bc.run()
|
||||||
assert bc.output["full_text"] == expected
|
assert bc.output["full_text"] == expected
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user