From 5e5bcd951e418876000e3466f98cb828c3f1dcd5 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 4 Sep 2023 20:16:50 +0300 Subject: [PATCH 1/6] Disable `differing_test_runners` health check --- Lib/test/support/hypothesis_helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/support/hypothesis_helper.py b/Lib/test/support/hypothesis_helper.py index da16eb50c25958..19a951a0e13cac 100644 --- a/Lib/test/support/hypothesis_helper.py +++ b/Lib/test/support/hypothesis_helper.py @@ -10,7 +10,10 @@ hypothesis.settings.register_profile( "slow-is-ok", deadline=None, - suppress_health_check=[hypothesis.HealthCheck.too_slow], + suppress_health_check=[ + hypothesis.HealthCheck.too_slow, + hypothesis.HealthCheck.differing_test_runners, + ], ) hypothesis.settings.load_profile("slow-is-ok") From fd8632de61f6c6ba11a8cc270866400cfd55658d Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 4 Sep 2023 20:30:02 +0300 Subject: [PATCH 2/6] Pin hypothesis --- .github/workflows/build.yml | 2 +- Tools/requirements-tests.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 Tools/requirements-tests.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d37eb4447ad11a..77d2dd3f9a4a6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -431,7 +431,7 @@ jobs: VENV_PYTHON=$VENV_LOC/bin/python echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV - ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -U hypothesis + ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r Tools/requirements-tests.txt - name: 'Restore Hypothesis database' id: cache-hypothesis-database uses: actions/cache@v3 diff --git a/Tools/requirements-tests.txt b/Tools/requirements-tests.txt new file mode 100644 index 00000000000000..c726bcd496d4b3 --- /dev/null +++ b/Tools/requirements-tests.txt @@ -0,0 +1,4 @@ +# Requirements file for external linters and checks we run on +# CPython itself in CI. + +hypothesis==6.84.0 From 58a14cfdb17618f5d09ef681dbe2dff070bcb7ab Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 4 Sep 2023 20:35:30 +0300 Subject: [PATCH 3/6] Fix path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77d2dd3f9a4a6a..d9632fcfb0a951 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -431,7 +431,7 @@ jobs: VENV_PYTHON=$VENV_LOC/bin/python echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV - ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r Tools/requirements-tests.txt + ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-tests.txt - name: 'Restore Hypothesis database' id: cache-hypothesis-database uses: actions/cache@v3 From 71064e8f2c985d6b8438d1620d251928f64d623a Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 4 Sep 2023 20:38:37 +0300 Subject: [PATCH 4/6] Rename deps file --- .github/workflows/build.yml | 2 +- Tools/{requirements-tests.txt => requirements-hypothesis.txt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Tools/{requirements-tests.txt => requirements-hypothesis.txt} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9632fcfb0a951..bb568f8d3a1a12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -431,7 +431,7 @@ jobs: VENV_PYTHON=$VENV_LOC/bin/python echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV - ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-tests.txt + ./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt - name: 'Restore Hypothesis database' id: cache-hypothesis-database uses: actions/cache@v3 diff --git a/Tools/requirements-tests.txt b/Tools/requirements-hypothesis.txt similarity index 100% rename from Tools/requirements-tests.txt rename to Tools/requirements-hypothesis.txt From 7a455856ce9e8f7737cdf1a8e5e9313376ca2414 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 4 Sep 2023 20:39:58 +0300 Subject: [PATCH 5/6] Fix comment --- Tools/requirements-hypothesis.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/requirements-hypothesis.txt b/Tools/requirements-hypothesis.txt index c726bcd496d4b3..9db2b74c87cfb0 100644 --- a/Tools/requirements-hypothesis.txt +++ b/Tools/requirements-hypothesis.txt @@ -1,4 +1,4 @@ -# Requirements file for external linters and checks we run on -# CPython itself in CI. +# Requirements file for hypothesis that +# we use to run our property-based tests in CI. hypothesis==6.84.0 From 0d8b9ed71b755fc89b26be78087680541bd8e862 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 4 Sep 2023 21:01:26 +0300 Subject: [PATCH 6/6] Use `differing_executors` --- Lib/test/support/hypothesis_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/support/hypothesis_helper.py b/Lib/test/support/hypothesis_helper.py index 19a951a0e13cac..db93eea5e912e0 100644 --- a/Lib/test/support/hypothesis_helper.py +++ b/Lib/test/support/hypothesis_helper.py @@ -12,7 +12,7 @@ deadline=None, suppress_health_check=[ hypothesis.HealthCheck.too_slow, - hypothesis.HealthCheck.differing_test_runners, + hypothesis.HealthCheck.differing_executors, ], ) hypothesis.settings.load_profile("slow-is-ok")