diff --git a/bumblebee/config.py b/bumblebee/config.py index d9c9419..d33219c 100644 --- a/bumblebee/config.py +++ b/bumblebee/config.py @@ -8,7 +8,7 @@ class Config(object): self._args = parser.parse_args(args) 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): parser = argparse.ArgumentParser(description="display system data in the i3bar") diff --git a/runtests.sh b/runtests.sh index 58521b5..089f936 100755 --- a/runtests.sh +++ b/runtests.sh @@ -1,3 +1,5 @@ #!/bin/sh -nosetests --rednose -v tests/ +test=$(which nosetests) +python2 $test --rednose -v tests/ +python3 $test --rednose -v tests/ diff --git a/tests/test_config.py b/tests/test_config.py index 66fd1d8..d344932 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -13,6 +13,6 @@ class TestConfig(unittest.TestCase): def test_load_simple_modules(self): cfg = Config([ "-m" ] + self.someSimpleModules) 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