[tests] Add Python3 test run
Add testrun to also verify Python3 functionality. + Immediately fix a Python3 incompatibility. see #23
This commit is contained in:
parent
a8a6c9bba2
commit
a720baf407
3 changed files with 5 additions and 3 deletions
|
@ -8,7 +8,7 @@ class Config(object):
|
||||||
self._args = parser.parse_args(args)
|
self._args = parser.parse_args(args)
|
||||||
|
|
||||||
def modules(self):
|
def modules(self):
|
||||||
return map(lambda x: { "name": x, "module": x }, self._args.modules)
|
return list(map(lambda x: { "name": x, "module": x }, self._args.modules))
|
||||||
|
|
||||||
def _create_parser(self):
|
def _create_parser(self):
|
||||||
parser = argparse.ArgumentParser(description="display system data in the i3bar")
|
parser = argparse.ArgumentParser(description="display system data in the i3bar")
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
nosetests --rednose -v tests/
|
test=$(which nosetests)
|
||||||
|
python2 $test --rednose -v tests/
|
||||||
|
python3 $test --rednose -v tests/
|
||||||
|
|
|
@ -13,6 +13,6 @@ class TestConfig(unittest.TestCase):
|
||||||
def test_load_simple_modules(self):
|
def test_load_simple_modules(self):
|
||||||
cfg = Config([ "-m" ] + self.someSimpleModules)
|
cfg = Config([ "-m" ] + self.someSimpleModules)
|
||||||
self.assertEquals(cfg.modules(),
|
self.assertEquals(cfg.modules(),
|
||||||
map(lambda x: { "name": x, "module": x }, self.someSimpleModules))
|
list(map(lambda x: { "name": x, "module": x }, self.someSimpleModules)))
|
||||||
|
|
||||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
|
Loading…
Reference in a new issue