diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0af8d68ed22175e6bb0c94245588cf05afab474b..f2cb682d54b107a844e2bac2d0f2e7c74aac701b 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,16 +37,16 @@ Documentation: - export RELATE_LOCAL_TEST_SETTINGS=`pwd`/local_settings_example.py - ". ./build-docs.sh" tags: - - python3.5 + - python3 only: - master 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.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 diff --git a/course/page/code.py b/course/page/code.py index 96a878a4cd954a41fd71f9a3f054afe2f806ad11..a2de3c27864512ebbb10c24699080eec89b7ae8d 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 bdb1818a74741582776447807f4c911ba4938526..617f7e21d816d34ba2c056a5ef35bcbee60b31d6 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):