|
|
@@ -390,3 +390,20 @@ class TestClient(object): |
|
|
|
# Programs that spit out invalid UTF-8 should get replacement |
|
|
|
# markers |
|
|
|
verify("echo -ne \\\\xae", u"\ufffd") |
|
|
|
|
|
|
|
def test_client_11_atexit(self): |
|
|
|
# Leave a directory and running process behind, for the atexit |
|
|
|
# handler to clean up. Here we trigger the atexit manually, |
|
|
|
# since it's hard to trigger it as part of the test suite. |
|
|
|
client = HTTPClient(baseurl = testurl, post_json = True) |
|
|
|
code = textwrap.dedent(""" |
|
|
|
import time |
|
|
|
time.sleep(10) |
|
|
|
""") |
|
|
|
client.post("run/code", { "code": code, "args": [ "hello"] }) |
|
|
|
|
|
|
|
# Trigger atexit function |
|
|
|
test_server._manager._atexit() |
|
|
|
|
|
|
|
# Ensure no processes exit |
|
|
|
eq_(client.get("process/list"), []) |