Skip to content

Commit 970d3b9

Browse files
just do module discovery once and skip urwid UrwidCrashersTest
1 parent 3cddcc6 commit 970d3b9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

bpython/test/test_crashers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
import textwrap
88
import unittest
99

10+
try:
11+
from unittest import skip
12+
except ImportError:
13+
def skip(f):
14+
return lambda self: None
15+
1016
try:
1117
from twisted.internet import reactor
1218
from twisted.internet.defer import Deferred
@@ -104,6 +110,7 @@ def check_no_traceback(self, data):
104110
class CursesCrashersTest(TrialTestCase, CrashersTest):
105111
backend = "cli"
106112

113+
@skip("take 6 seconds, and Simon says we can skip them")
107114
class UrwidCrashersTest(TrialTestCase, CrashersTest):
108115
backend = "urwid"
109116

bpython/test/test_importcompletion.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ def test_package_completion(self):
1515

1616

1717
class TestRealComplete(unittest.TestCase):
18-
def setUp(self):
18+
@classmethod
19+
def setUpClass(cls):
1920
[_ for _ in importcompletion.find_iterator]
2021
__import__('sys')
2122
__import__('os')
22-
def tearDown(self):
23+
@classmethod
24+
def tearDownClass(cls):
2325
importcompletion.find_iterator = importcompletion.find_all_modules()
2426
importcompletion.modules = set()
2527
def test_from_attribute(self):

0 commit comments

Comments
 (0)