From ca9740df20a804043f236861278cfe70014b5d57 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 18 Jun 2013 00:53:38 +0200 Subject: [PATCH] skip tests on windows that don't make sense --- test/test_proxy.py | 1 + test/tutils.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/test_proxy.py b/test/test_proxy.py index 5828d0777..ed47dbac2 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -133,6 +133,7 @@ class TestProcessProxyOptions: class TestProxyServer: + @tutils.SkipWindows # binding to 0.0.0.0:1 works without special permissions on Windows def test_err(self): parser = argparse.ArgumentParser() cmdline.common_options(parser) diff --git a/test/tutils.py b/test/tutils.py index fbce615a5..e42256edf 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -2,7 +2,15 @@ import os, shutil, tempfile from contextlib import contextmanager from libmproxy import flow, utils, controller from netlib import certutils -import mock +from nose.plugins.skip import SkipTest + +def _SkipWindows(): + raise SkipTest("Skipped on Windows.") +def SkipWindows(fn): + if os.name == "nt": + return _SkipWindows + else: + return fn def treq(conn=None): if not conn: