Skip to content

Commit 9a1516e

Browse files
committed
Use venv/bin/activate to apply the monkey_patch
1 parent c58cce5 commit 9a1516e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.circleci/config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ jobs:
3535
tests/setup_testing_env.sh
3636
set -x
3737
which nosetests
38-
# eventlet monkey_patch as early as possible
39-
sed -i -e '/^import re$/i from st2common.util.monkey_patch import monkey_patch\nmonkey_patch()' $(which nosetests)
40-
head -n5 $(which nosetests)
38+
# eventlet monkey_patch as early as possible (has to be in activate as nosetests gets reinstalled during test phase)
39+
echo "grep -q monkey_patch $(which nosetests) || sed -i -e '/^import re$/i from st2common.util.monkey_patch import monkey_patch\nmonkey_patch()' $(which nosetests)" >> ~/virtualenv/bin/activate
4140
- run:
4241
name: Run tests (Python 3.6)
4342
# NOTE: We don't want to use default "-e" option because this means

0 commit comments

Comments
 (0)