issue #406: parent_test fixes, NameError in log_fd_calls().

issue260
David Wilson 6 years ago
parent 375182b71b
commit b0dd628f07

@ -207,6 +207,7 @@ class TtyCreateChildTest(testlib.TestCase):
self.assertEquals(pid, waited_pid)
self.assertEquals(0, status)
self.assertEquals(mitogen.core.b(''), tf.read())
os.close(fd)
finally:
tf.close()
@ -283,7 +284,7 @@ class WriteAllTest(testlib.TestCase):
self.func(proc.stdin.fileno(), self.ten_ms_chunk)
finally:
proc.terminate()
proc.stdout.close()
proc.stdin.close()
def test_deadline_exceeded_before_call(self):
proc = self.make_proc()
@ -293,7 +294,7 @@ class WriteAllTest(testlib.TestCase):
))
finally:
proc.terminate()
proc.stdout.close()
proc.stdin.close()
def test_deadline_exceeded_during_call(self):
proc = self.make_proc()
@ -306,7 +307,7 @@ class WriteAllTest(testlib.TestCase):
))
finally:
proc.terminate()
proc.stdout.close()
proc.stdin.close()
class DisconnectTest(testlib.RouterMixin, testlib.TestCase):

@ -218,7 +218,7 @@ def log_fd_calls():
real_dup = os.dup
def dup(*args):
with l:
rc = real_dup(*args)
rv = real_dup(*args)
if mypid == os.getpid():
print
print '--', args, '->', rv

Loading…
Cancel
Save