diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-21 23:03:45 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-21 23:03:45 +0200 |
commit | 2f670bac99943404952ebd5e76490e9643e50297 (patch) | |
tree | b6b25128692be754084aa35c95191400ef592b95 /test/test_pathoc_cmdline.py | |
parent | 2da4aaf1ede8310bb14c22e82248002b97b5f3e5 (diff) | |
download | mitmproxy-2f670bac99943404952ebd5e76490e9643e50297.tar.gz mitmproxy-2f670bac99943404952ebd5e76490e9643e50297.tar.bz2 mitmproxy-2f670bac99943404952ebd5e76490e9643e50297.zip |
fix tests, use pytest
We currently test with unparallelized builds,
because there are apparently some race conditions
in the test suite, which I can't trigger locally
but happen on travis.
Squashed commit of the following:
commit 7dceb6dd3a1bdbc39688258bc4dff6eee685a33b
Author: Maximilian Hils <git@maximilianhils.com>
Date: Mon Sep 21 23:00:24 2015 +0200
disable parallelized tests
commit fc0c3f12ee9259162e83026851362925d93b69f2
Author: Maximilian Hils <git@maximilianhils.com>
Date: Mon Sep 21 22:49:19 2015 +0200
fix tests
commit baba3ca5ef49bdbd7aad14f1bf0626738fa3d21c
Author: Maximilian Hils <git@maximilianhils.com>
Date: Mon Sep 21 22:28:20 2015 +0200
fix tests, use py.test
Diffstat (limited to 'test/test_pathoc_cmdline.py')
-rw-r--r-- | test/test_pathoc_cmdline.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/test_pathoc_cmdline.py b/test/test_pathoc_cmdline.py index 6c070aed..74dfef57 100644 --- a/test/test_pathoc_cmdline.py +++ b/test/test_pathoc_cmdline.py @@ -8,9 +8,8 @@ import mock def test_pathoc(perror): assert cmdline.args_pathoc(["pathoc", "foo.com", "get:/"]) s = cStringIO.StringIO() - tutils.raises( - SystemExit, cmdline.args_pathoc, [ - "pathoc", "--show-uas"], s, s) + with tutils.raises(SystemExit): + cmdline.args_pathoc(["pathoc", "--show-uas"], s, s) a = cmdline.args_pathoc(["pathoc", "foo.com:8888", "get:/"]) assert a.port == 8888 @@ -56,9 +55,5 @@ def test_pathoc(perror): ) assert len(list(a.requests)) == 1 - tutils.raises( - SystemExit, - cmdline.args_pathoc, - ["pathoc", "foo.com", "invalid"], - s, s - ) + with tutils.raises(SystemExit): + cmdline.args_pathoc(["pathoc", "foo.com", "invalid"], s, s) |