1
0
forked from VimPlug/jedi

python compatibility stuff

This commit is contained in:
David Halter
2012-10-23 19:40:34 +02:00
parent ba7cc5db24
commit 106a3f953c
+7 -8
View File
@@ -211,14 +211,14 @@ class TestSpeed(Base):
for i in range(number): for i in range(number):
func(self) func(self)
single_time = (time.time() - first) / number single_time = (time.time() - first) / number
print func, single_time print(func, single_time)
assert single_time < time_per_run assert single_time < time_per_run
return wrapper return wrapper
return decorated return decorated
@unittest.skip('not used yet') # skip by removing test
@_check_speed(0.1) @_check_speed(0.1)
def test_os_path_join(self): def _test_os_path_join(self):
s = "from posixpath import join; join('', '')." s = "from posixpath import join; join('', '')."
assert len(self.complete(s)) > 10 # is a str completion assert len(self.complete(s)) > 10 # is a str completion
@@ -227,15 +227,14 @@ class TestSpeed(Base):
s = 'from scipy.weave import inline; inline(' s = 'from scipy.weave import inline; inline('
self.get_in_function_call(s) self.get_in_function_call(s)
@unittest.skip('not used yet') #@unittest.expectedFailure
@unittest.expectedFailure
@_check_speed(0.6, number=1) @_check_speed(0.6, number=1)
def test_new(self): def _test_new(self):
s = 'import scipy.weave; scipy.weave.inline(' s = 'import scipy.weave; scipy.weave.inline('
api.set_debug_function(api.debug.print_to_stdout) api.set_debug_function(api.debug.print_to_stdout)
#print self.get_in_function_call(s) #print(self.get_in_function_call(s))
api.set_debug_function(None) api.set_debug_function(None)
#print api.imports.imports_processed #print(api.imports.imports_processed)
if __name__ == '__main__': if __name__ == '__main__':