Exemplo n.º 1
0
 def test(i):
     cb_file = method_with_callback(callback_for_method, 0.5)
     with open(cb_file, 'rb') as f:
         contents = f.read()
         assert contents == (
             '.' * (i + 1)), "Got {0} was expecting {1}".format(
                 contents, ('.' * (i + 1)))
Exemplo n.º 2
0
 def test(i):
     method_with_callback(callback_for_method, random.random())
     with open(CALLBACK_FILE, 'rb') as f:
         assert f.read() == ('.' * (i+1))
Exemplo n.º 3
0
 def test(i):
     cb_file = method_with_callback(callback_for_method)
     with open(cb_file, 'rb') as f:
         contents = f.read()
         assert contents == ('.' * (i+1)), "Got {0} was expecting {1}".format(contents, ('.' * (i+1)))