diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-11-16 20:37:01 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-11-16 20:37:01 +0300 |
commit | 567f0a7b3049f4532524ac35cb232cbeedb868bf (patch) | |
tree | 8a2eb4f43b5750c6e4fa47d7278a0b2e6e9508ce /test/unit/http.py | |
parent | 6d2b60ff3e6f905b81c6d2fc6595b39250e3a586 (diff) | |
download | unit-567f0a7b3049f4532524ac35cb232cbeedb868bf.tar.gz unit-567f0a7b3049f4532524ac35cb232cbeedb868bf.tar.bz2 |
Tests: fixing tests interrupt in terminal.
KeyboardInterrupt re-raised.
Diffstat (limited to 'test/unit/http.py')
-rw-r--r-- | test/unit/http.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/unit/http.py b/test/unit/http.py index 5f073439..8d964978 100644 --- a/test/unit/http.py +++ b/test/unit/http.py @@ -187,6 +187,10 @@ class TestHTTP(TestUnit): try: part = sock.recv(buff_size) + + except KeyboardInterrupt: + raise + except: break @@ -242,7 +246,8 @@ class TestHTTP(TestUnit): try: last_size = int(chunks[-2], 16) - except: + + except ValueError: pytest.fail('Invalid zero size chunk') if last_size != 0 or chunks[-1] != b'': @@ -252,7 +257,8 @@ class TestHTTP(TestUnit): while len(chunks) >= 2: try: size = int(chunks.pop(0), 16) - except: + + except ValueError: pytest.fail('Invalid chunk size %s' % str(size)) if size == 0: |