diff --git a/tests/functional/test_misc.py b/tests/functional/test_misc.py index 8e116a7ac..c478c165a 100644 --- a/tests/functional/test_misc.py +++ b/tests/functional/test_misc.py @@ -1,6 +1,7 @@ import shutil from multiprocessing import Process, Event, Queue import logging +import platform import sys import random import io @@ -50,6 +51,15 @@ log_format = "%(funcName)s(): %(message)s" logging.basicConfig(level=logging.WARNING, format=log_format) +def require_system(system): + def wrapper(fn): + return fn + if platform.system() == system: + return wrapper + else: + return unittest.skip("Skipping. Test can only be run on " + system) + + class FakeNode(object): def __init__(self, *args, **kwargs): pass @@ -845,6 +855,7 @@ class TestTransfer(TestCase): return d + @require_system('Linux') def test_live_transfer(self): sd_hash_queue = Queue() @@ -940,6 +951,7 @@ class TestTransfer(TestCase): d.addBoth(stop) return d + @require_system('Linux') def test_last_blob_retrieval(self): kill_event = Event()