Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Commit 14b49f9

Browse files
horizon-bluefacebook-github-bot
authored andcommitted
Install a patched version of pytest on CircleCI (#477)
Summary: Pull Request resolved: #477 As titled. Currently pytest's `import-mode=importlib` option does not add the test file to `sys.module`, which can break some of the use cases. While [the community has came up with a fix](pytest-dev/pytest#7870), it's not yet clear when the particular PR will be merged and added to the latest pytest. So in the meanwhile, we could download and use the patched version by directly from the PR so we are not blocked. Reviewed By: ericlippert Differential Revision: D25480894 fbshipit-source-id: 5eddce784a247f68ebcaa5ae85065220f65d847a
1 parent 223c5db commit 14b49f9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.circleci/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ commands:
3131
name: "Install beanmachine"
3232
command: sudo pip install --progress-bar off -v .
3333

34+
pip_install_pytest_patch:
35+
steps:
36+
- run:
37+
name: "Install a patched pytest version from PR (pytest-dev/pytest#7870)"
38+
command: >
39+
sudo pip install --progress-bar off
40+
git+https://github.com/pytest-dev/pytest.git@refs/pull/7870/head
41+
3442
apt_get_install_deps:
3543
description: "Install beanmachine graph dependencies via apt-get"
3644
steps:
@@ -113,6 +121,7 @@ jobs:
113121
- pip_install_deps
114122
- checkout
115123
- dev_install
124+
- pip_install_pytest_patch
116125
- dev_unit_tests
117126

118127
user_par_install_test_py37_pip:
@@ -123,6 +132,7 @@ jobs:
123132
- pip_install_deps
124133
- checkout
125134
- user_install
135+
- pip_install_pytest_patch
126136
- user_par_unit_tests
127137

128138
lint_py37_pip:
@@ -143,6 +153,7 @@ jobs:
143153
- pip_install_deps
144154
- checkout
145155
- user_install
156+
- pip_install_pytest_patch
146157
- nightly_tests
147158

148159

0 commit comments

Comments
 (0)