From 3c9ea296c06d66ea9a717804e18455c731ccee1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Sun, 3 Feb 2019 20:29:26 +0100 Subject: [PATCH 1/3] CI: Stop targeting specific Py3 versions --- .gitlab-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0af8d68e..12c8389e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,11 +10,11 @@ variables: CODECOV_TOKEN: "895e3bf2-cfd0-45f8-9a14-4b7bd148f76d" -Python 3.6: +Python 3: script: - - "PY_EXE=python3.6 bash ./run-tests-for-ci.sh" + - "PY_EXE=python3 bash ./run-tests-for-ci.sh" tags: - - python3.6 + - python3 - linux except: - tags @@ -22,11 +22,11 @@ Python 3.6: variables: CODECOV_TOKEN: "895e3bf2-cfd0-45f8-9a14-4b7bd148f76d" -Python 3.6 CLI Tool: +Python 3 CLI Tool: script: - - "PY_EXE=python3.6 bash ./test-command-line-tool.sh python3.6" + - "PY_EXE=python3 bash ./test-command-line-tool.sh python3" tags: - - python3.6 + - python3 - linux except: - tags @@ -37,7 +37,7 @@ Documentation: - export RELATE_LOCAL_TEST_SETTINGS=`pwd`/local_settings_example.py - ". ./build-docs.sh" tags: - - python3.5 + - python3 only: - master @@ -46,7 +46,7 @@ Mypy: - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-mypy.sh - ". ./prepare-and-run-mypy.sh python3.6 mypy==0.641" tags: - - python3.6 + - python3 except: - tags @@ -55,6 +55,6 @@ Flake8: - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh - ". ./prepare-and-run-flake8.sh relate course accounts tests bin" tags: - - python3.5 + - python3 except: - tags -- GitLab From 4b4dbf165fb68db2c464aa3d4d6007fbbd567dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Sun, 3 Feb 2019 20:36:40 +0100 Subject: [PATCH 2/3] Fix over-indentation --- course/page/code.py | 20 ++++++++++---------- tests/test_content.py | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/course/page/code.py b/course/page/code.py index 96a878a4..a2de3c27 100644 --- a/course/page/code.py +++ b/course/page/code.py @@ -167,16 +167,16 @@ def request_python_run(run_req, run_timeout, image=None): from traceback import format_exc def check_timeout(): - if time() - start_time < DOCKER_TIMEOUT: - sleep(0.1) - # and retry - else: - return { - "result": "uncaught_error", - "message": "Timeout waiting for container.", - "traceback": "".join(format_exc()), - "exec_host": connect_host_ip, - } + if time() - start_time < DOCKER_TIMEOUT: + sleep(0.1) + # and retry + else: + return { + "result": "uncaught_error", + "message": "Timeout waiting for container.", + "traceback": "".join(format_exc()), + "exec_host": connect_host_ip, + } while True: try: diff --git a/tests/test_content.py b/tests/test_content.py index bdb1818a..617f7e21 100644 --- a/tests/test_content.py +++ b/tests/test_content.py @@ -690,11 +690,11 @@ class GitTemplateLoaderTest(SingleCourseTestMixin, TestCase): with mock.patch( "course.content.get_repo_blob_data_cached", return_value=b"blahblah"): - loader = content.GitTemplateLoader( - repo, self.course.active_git_commit_sha.encode()) - _, __, uptodate = loader.get_source(environment=environment, - template=template) - self.assertFalse(uptodate()) + loader = content.GitTemplateLoader( + repo, self.course.active_git_commit_sha.encode()) + _, __, uptodate = loader.get_source(environment=environment, + template=template) + self.assertFalse(uptodate()) class YamlBlockEscapingFileSystemLoaderTest(SingleCourseTestMixin, TestCase): -- GitLab From a23c3fe768b15611f5199ad927b519a7ba83948f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Sun, 3 Feb 2019 20:41:26 +0100 Subject: [PATCH 3/3] Remove stray ".6" (3.6) in mypy CI config --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12c8389e..f2cb682d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,7 +44,7 @@ Documentation: Mypy: script: - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-mypy.sh - - ". ./prepare-and-run-mypy.sh python3.6 mypy==0.641" + - ". ./prepare-and-run-mypy.sh python3 mypy==0.641" tags: - python3 except: -- GitLab