diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-06-09 15:08:51 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-06-09 15:08:51 +1200 |
commit | 00c8bef0ff21794e622b7f442408e29c644b7002 (patch) | |
tree | fe016e005c73f7403a7a94f6ac8cc606cb838040 /test/test_utils.py | |
parent | 456b11df9a571e7f72570df1c5f6b4a59fd02c11 (diff) | |
download | mitmproxy-00c8bef0ff21794e622b7f442408e29c644b7002.tar.gz mitmproxy-00c8bef0ff21794e622b7f442408e29c644b7002.tar.bz2 mitmproxy-00c8bef0ff21794e622b7f442408e29c644b7002.zip |
Port test suite over to Nose.
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index eb658e96..5cd0fd3d 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -1,21 +1,13 @@ -import libpry from libpathod import utils +import tutils -class uparse_anchor_spec(libpry.AutoTree): - def test_simple(self): - assert utils.parse_anchor_spec("foo=200", {}) == ("foo", "200") - libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foobar", {}) - libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "*=200", {}) - libpry.raises(utils.AnchorError, utils.parse_anchor_spec, "foo=bar", {}) +def test_parse_anchor_spec(): + assert utils.parse_anchor_spec("foo=200", {}) == ("foo", "200") + tutils.raises(utils.AnchorError, utils.parse_anchor_spec, "foobar", {}) + tutils.raises(utils.AnchorError, utils.parse_anchor_spec, "*=200", {}) + tutils.raises(utils.AnchorError, utils.parse_anchor_spec, "foo=bar", {}) -class udata_path(libpry.AutoTree): - def test_simple(self): - libpry.raises(ValueError, utils.data.path, "nonexistent") - - -tests = [ - udata_path(), - uparse_anchor_spec() -] +def test_data_path(): + tutils.raises(ValueError, utils.data.path, "nonexistent") |