diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_language_base.py | 2 | ||||
-rw-r--r-- | test/test_pathod.py | 4 | ||||
-rw-r--r-- | test/test_utils.py | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/test/test_language_base.py b/test/test_language_base.py index d59ee88b..020d68ed 100644 --- a/test/test_language_base.py +++ b/test/test_language_base.py @@ -85,7 +85,7 @@ class TestTokValueGenerate: v = base.TokValue.parseString("@10k")[0] assert v.bytes() == 10240 v = base.TokValue.parseString("@10g")[0] - assert v.bytes() == 1024**3 * 10 + assert v.bytes() == 1024 ** 3 * 10 v = base.TokValue.parseString("@10g,digits")[0] assert v.datatype == "digits" diff --git a/test/test_pathod.py b/test/test_pathod.py index 7f07c041..5ff3e68c 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -1,3 +1,4 @@ +import cStringIO from libpathod import pathod, version from netlib import tcp, http import tutils @@ -5,7 +6,8 @@ import tutils class TestPathod(object): def test_logging(self): - p = pathod.Pathod(("127.0.0.1", 0)) + s = cStringIO.StringIO() + p = pathod.Pathod(("127.0.0.1", 0), logfp=s) assert len(p.get_log()) == 0 id = p.add_log(dict(s="foo")) assert p.log_by_id(id) diff --git a/test/test_utils.py b/test/test_utils.py index 2a158a07..7d24e9e4 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -20,7 +20,7 @@ def test_parse_size(): def test_parse_anchor_spec(): assert utils.parse_anchor_spec("foo=200") == ("foo", "200") - assert utils.parse_anchor_spec("foo") == None + assert utils.parse_anchor_spec("foo") is None def test_data_path(): |