diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2021-11-15 12:13:54 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2021-11-15 12:13:54 +0000 |
commit | ae035852385032cc6c502c0e560fc682cacdbf34 (patch) | |
tree | 1f2ce0debba13e7cf2589a432638c65c38bc607d /test/unit/applications/lang/go.py | |
parent | 28eaf9d37842a5d79d8081cc14fbf4cc7e7d49a5 (diff) | |
download | unit-ae035852385032cc6c502c0e560fc682cacdbf34.tar.gz unit-ae035852385032cc6c502c0e560fc682cacdbf34.tar.bz2 |
Tests: refactored working with processes.
Diffstat (limited to 'test/unit/applications/lang/go.py')
-rw-r--r-- | test/unit/applications/lang/go.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py index 6be1667b..367059e6 100644 --- a/test/unit/applications/lang/go.py +++ b/test/unit/applications/lang/go.py @@ -40,13 +40,12 @@ class TestApplicationGo(TestApplicationProto): print("\n$ GOPATH=" + env['GOPATH'] + " " + " ".join(args)) try: - process = subprocess.Popen(args, env=env) - process.communicate() + process = subprocess.run(args, env=env) except KeyboardInterrupt: raise - except: + except subprocess.CalledProcessError: return None return process |