summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2021-05-27 16:25:34 +0100
committerBen Brown <ben.brown@codethink.co.uk>2021-06-01 15:09:07 +0100
commit11ae11bfa5f9fcb903689805f8d35b4d62ab0c90 (patch)
tree11ed39b3ddd4917dd4d42299b83b2c5ba5914e3e
parent4c475abe30c36217da920477f3748e26f3395365 (diff)
downloadgitlab-11ae11bfa5f9fcb903689805f8d35b4d62ab0c90.tar.gz
test(cli): replace assignment expression
This is a feature added in 3.8, removing it allows for the test to run with lower python versions.
-rw-r--r--tests/functional/cli/test_cli_artifacts.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/functional/cli/test_cli_artifacts.py b/tests/functional/cli/test_cli_artifacts.py
index 4cb69aa..aab0546 100644
--- a/tests/functional/cli/test_cli_artifacts.py
+++ b/tests/functional/cli/test_cli_artifacts.py
@@ -1,12 +1,9 @@
import subprocess
-import sys
import textwrap
import time
from io import BytesIO
from zipfile import is_zipfile
-import pytest
-
content = textwrap.dedent(
"""\
test-artifact:
@@ -23,11 +20,12 @@ data = {
}
-@pytest.mark.skipif(sys.version_info < (3, 8), reason="I am the walrus")
def test_cli_artifacts(capsysbinary, gitlab_config, gitlab_runner, project):
project.files.create(data)
- while not (jobs := project.jobs.list(scope="success")):
+ jobs = None
+ while not jobs:
+ jobs = project.jobs.list(scope="success")
time.sleep(0.5)
job = project.jobs.get(jobs[0].id)