Commit 70fdd79c authored by Stefan Krah's avatar Stefan Krah

Fix test failures --without-threads.

parent b190b33f
import socket import socket
import threading
import nntplib import nntplib
import time import time
import unittest
try:
import threading
except ImportError:
threading = None
from unittest import TestCase from unittest import TestCase
from test import test_support from test import test_support
...@@ -41,6 +47,7 @@ class BaseServerTest(TestCase): ...@@ -41,6 +47,7 @@ class BaseServerTest(TestCase):
self.evt.wait() self.evt.wait()
@unittest.skipUnless(threading, 'threading required')
class ServerTests(BaseServerTest): class ServerTests(BaseServerTest):
evil = False evil = False
...@@ -49,6 +56,7 @@ class ServerTests(BaseServerTest): ...@@ -49,6 +56,7 @@ class ServerTests(BaseServerTest):
nntp.sock.close() nntp.sock.close()
@unittest.skipUnless(threading, 'threading required')
class EvilServerTests(BaseServerTest): class EvilServerTests(BaseServerTest):
evil = True evil = True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment