diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2023-05-25 14:26:12 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2023-05-25 14:26:12 +0100 |
commit | 3e4fa1e2022970dee003bea0932ea0c10f8744ba (patch) | |
tree | d23b32b9a6e33dc57694547f1ec1427f1a19a01a /test/unit | |
parent | 47cdfb6f30f7d56bffb806cc860e20806ea62f50 (diff) | |
download | unit-3e4fa1e2022970dee003bea0932ea0c10f8744ba.tar.gz unit-3e4fa1e2022970dee003bea0932ea0c10f8744ba.tar.bz2 |
Tests: removed unused variables.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/applications/proto.py | 2 | ||||
-rw-r--r-- | test/unit/check/isolation.py | 1 | ||||
-rw-r--r-- | test/unit/utils.py | 12 |
3 files changed, 7 insertions, 8 deletions
diff --git a/test/unit/applications/proto.py b/test/unit/applications/proto.py index f04ee408..f4d4afe4 100644 --- a/test/unit/applications/proto.py +++ b/test/unit/applications/proto.py @@ -26,7 +26,7 @@ class TestApplicationProto(TestControl): def wait_for_record(self, pattern, name='unit.log', wait=150, flags=re.M): with Log.open(name) as f: - for i in range(wait): + for _ in range(wait): found = re.search(pattern, f.read(), flags) if found is not None: diff --git a/test/unit/check/isolation.py b/test/unit/check/isolation.py index 4ebce893..829d956b 100644 --- a/test/unit/check/isolation.py +++ b/test/unit/check/isolation.py @@ -14,7 +14,6 @@ http = TestHTTP() def check_isolation(): - test_conf = {"namespaces": {"credential": True}} available = option.available conf = '' diff --git a/test/unit/utils.py b/test/unit/utils.py index 985801e2..27e7dadc 100644 --- a/test/unit/utils.py +++ b/test/unit/utils.py @@ -24,7 +24,7 @@ def public_dir(path): def waitforfiles(*files, timeout=50): - for i in range(timeout): + for _ in range(timeout): wait = False for f in files: @@ -41,10 +41,10 @@ def waitforfiles(*files, timeout=50): def waitforglob(pattern, count=1, timeout=50): - for i in range(timeout): + for _ in range(timeout): n = 0 - for f in glob.glob(pattern): + for _ in glob.glob(pattern): n += 1 if n == count: @@ -56,7 +56,7 @@ def waitforglob(pattern, count=1, timeout=50): def waitforsocket(port): - for i in range(50): + for _ in range(50): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: try: sock.settimeout(5) @@ -102,7 +102,7 @@ def sysctl(): def waitformount(template, timeout=50): - for i in range(timeout): + for _ in range(timeout): if findmnt().find(template) != -1: return True @@ -112,7 +112,7 @@ def waitformount(template, timeout=50): def waitforunmount(template, timeout=50): - for i in range(timeout): + for _ in range(timeout): if findmnt().find(template) == -1: return True |