File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
2- import unittest
32from itertools import islice
43from mock import Mock
54try :
6- from unittest import skip
5+ import unittest2 as unittest
76except ImportError :
8- def skip (f ):
9- return lambda self : None
7+ import unittest
108
119from bpython import config , repl , cli , autocomplete
1210
@@ -245,7 +243,7 @@ def test_current_string(self):
245243 self .assertEqual (self .repl .current_string (), '' )
246244
247245 # TODO: figure out how to capture whether foobar is in globals
248- @skip ('not working yet' )
246+ @unittest . skip ('not working yet' )
249247 def test_push (self ):
250248 self .repl = FakeRepl ()
251249 self .repl .push ("foobar = 2" )
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ def initialize_options(self):
175175 install_requires .append ('ndg-httpsclient' )
176176 install_requires .append ('pyasn1' )
177177
178+ tests_require = ['mock' ]
179+ if sys .version_info [0 ] == 2 and sys .version_info [1 ] < 7 :
180+ tests_require .append ('unittest2' )
181+
178182# translations
179183mo_files = list ()
180184for language in os .listdir (translations_dir ):
@@ -194,7 +198,7 @@ def initialize_options(self):
194198 interpreter for Unix-like operating systems.""" ,
195199 install_requires = install_requires ,
196200 extras_require = extras_require ,
197- tests_require = [ 'mock' ] ,
201+ tests_require = tests_require ,
198202 packages = packages ,
199203 data_files = data_files ,
200204 package_data = {
You can’t perform that action at this time.
0 commit comments