forked from LBRYCommunity/lbry-sdk
Merge pull request #175 from lbryio/skip-tests
Tests requiring epoll should only run on linux
This commit is contained in:
commit
aefb6c5dc8
1 changed files with 12 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue