updated portalocker, few py3 syntax/import fix
This commit is contained in:
@@ -309,12 +309,12 @@ class TestsForSchedulerRunner(testForSchedulerRunnerBase):
|
||||
self.db.commit()
|
||||
self.writefunction(r"""
|
||||
def demo1(*args,**vars):
|
||||
print 'you passed args=%s and vars=%s' % (args, vars)
|
||||
print('you passed args=%s and vars=%s') % (args, vars)
|
||||
return args[0]
|
||||
|
||||
def demo4():
|
||||
time.sleep(15)
|
||||
print "I'm printing something"
|
||||
print("I'm printing something")
|
||||
return dict(a=1, b=2)
|
||||
""")
|
||||
ret = self.exec_sched()
|
||||
@@ -359,24 +359,24 @@ def demo4():
|
||||
self.writefunction(r"""
|
||||
def demo3():
|
||||
time.sleep(15)
|
||||
print 1/0
|
||||
print(1/0)
|
||||
return None
|
||||
|
||||
def demo4():
|
||||
time.sleep(15)
|
||||
print "I'm printing something"
|
||||
print("I'm printing something")
|
||||
return dict(a=1, b=2)
|
||||
|
||||
def demo5():
|
||||
time.sleep(15)
|
||||
print "I'm printing something"
|
||||
print("I'm printing something")
|
||||
rtn = dict(a=1, b=2)
|
||||
|
||||
def demo6():
|
||||
time.sleep(5)
|
||||
print '50%'
|
||||
print('50%')
|
||||
time.sleep(5)
|
||||
print '!clear!100%'
|
||||
print('!clear!100%')
|
||||
return 1
|
||||
""")
|
||||
ret = self.exec_sched()
|
||||
@@ -417,12 +417,12 @@ def demo6():
|
||||
self.db.commit()
|
||||
self.writefunction(r"""
|
||||
def demo1(*args,**vars):
|
||||
print 'you passed args=%s and vars=%s' % (args, vars)
|
||||
print('you passed args=%s and vars=%s' % (args, vars))
|
||||
return args[0]
|
||||
import random
|
||||
def demo7():
|
||||
time.sleep(random.randint(1,5))
|
||||
print W2P_TASK, request.now
|
||||
print(W2P_TASK, request.now)
|
||||
return W2P_TASK.id, W2P_TASK.uuid, W2P_TASK.run_id
|
||||
""")
|
||||
ret = self.exec_sched()
|
||||
@@ -466,7 +466,7 @@ def demo8():
|
||||
num_of_lines = 0
|
||||
with open(placeholder) as f:
|
||||
num_of_lines = len([a for a in f.read().split('\n') if a])
|
||||
print 'number of lines', num_of_lines
|
||||
print('number of lines', num_of_lines)
|
||||
if num_of_lines <= 2:
|
||||
1/0
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user