File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
- import unittest
3
2
from itertools import islice
4
3
from mock import Mock
5
4
try :
6
- from unittest import skip
5
+ import unittest2 as unittest
7
6
except ImportError :
8
- def skip (f ):
9
- return lambda self : None
7
+ import unittest
10
8
11
9
from bpython import config , repl , cli , autocomplete
12
10
@@ -245,7 +243,7 @@ def test_current_string(self):
245
243
self .assertEqual (self .repl .current_string (), '' )
246
244
247
245
# TODO: figure out how to capture whether foobar is in globals
248
- @skip ('not working yet' )
246
+ @unittest . skip ('not working yet' )
249
247
def test_push (self ):
250
248
self .repl = FakeRepl ()
251
249
self .repl .push ("foobar = 2" )
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ def initialize_options(self):
175
175
install_requires .append ('ndg-httpsclient' )
176
176
install_requires .append ('pyasn1' )
177
177
178
+ tests_require = ['mock' ]
179
+ if sys .version_info [0 ] == 2 and sys .version_info [1 ] < 7 :
180
+ tests_require .append ('unittest2' )
181
+
178
182
# translations
179
183
mo_files = list ()
180
184
for language in os .listdir (translations_dir ):
@@ -194,7 +198,7 @@ def initialize_options(self):
194
198
interpreter for Unix-like operating systems.""" ,
195
199
install_requires = install_requires ,
196
200
extras_require = extras_require ,
197
- tests_require = [ 'mock' ] ,
201
+ tests_require = tests_require ,
198
202
packages = packages ,
199
203
data_files = data_files ,
200
204
package_data = {
You can’t perform that action at this time.
0 commit comments