Skip to content

Commit 94bb657

Browse files
committed
Replace some 'skipIf(not …)' by 'skipUnless'.
1 parent f72f395 commit 94bb657

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

bpython/test/test_crashers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class CursesCrashersTest(TrialTestCase, CrashersTest):
128128
backend = "cli"
129129

130130

131-
@unittest.skipIf(not have_urwid, "urwid is not available")
131+
@unittest.skipUnless(have_urwid, "urwid is required")
132132
@unittest.skipIf(reactor is None, "twisted is not available")
133133
class UrwidCrashersTest(TrialTestCase, CrashersTest):
134134
backend = "urwid"

bpython/test/test_curtsies_repl.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def test_external_communication(self):
5959
self.repl.send_current_block_to_external_editor()
6060
self.repl.send_session_to_external_editor()
6161

62-
@unittest.skipIf(not all(map(config.can_encode, 'å∂߃')),
63-
'Charset can not encode characters')
62+
@unittest.skipUnless(all(map(config.can_encode, 'å∂߃')),
63+
'Charset can not encode characters')
6464
def test_external_communication_encoding(self):
6565
with captured_output():
6666
self.repl.display_lines.append('>>> "åß∂ƒ"')
@@ -291,15 +291,15 @@ def assert_pager_gets_unicode(self, text):
291291
def test_help(self):
292292
self.repl.pager(self.repl.help_text())
293293

294-
@unittest.skipIf(not all(map(config.can_encode, 'å∂߃')),
295-
'Charset can not encode characters')
294+
@unittest.skipUnless(all(map(config.can_encode, 'å∂߃')),
295+
'Charset can not encode characters')
296296
def test_show_source_not_formatted(self):
297297
self.repl.config.highlight_show_source = False
298298
self.repl.get_source_of_current_name = lambda: 'source code å∂߃åß∂ƒ'
299299
self.repl.show_source()
300300

301-
@unittest.skipIf(not all(map(config.can_encode, 'å∂߃')),
302-
'Charset can not encode characters')
301+
@unittest.skipUnless(all(map(config.can_encode, 'å∂߃')),
302+
'Charset can not encode characters')
303303
def test_show_source_formatted(self):
304304
self.repl.config.highlight_show_source = True
305305
self.repl.get_source_of_current_name = lambda: 'source code å∂߃åß∂ƒ'

bpython/test/test_filewatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from bpython.test import mock
1616

17-
@unittest.skipIf(not has_watchdog, "watchdog not available")
17+
@unittest.skipUnless(has_watchdog, "watchdog required")
1818
class TestModuleChangeEventHandler(unittest.TestCase):
1919

2020
def setUp(self):

0 commit comments

Comments
 (0)