File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 7
7
else :
8
8
# Regrtest changes to use a tempdir as the working directory, so we have
9
9
# to tell Hypothesis to use the original in order to persist the database.
10
- from .os_helper import SAVEDCWD
10
+ from test .support import has_socket_support
11
+ from test .support .os_helper import SAVEDCWD
11
12
from hypothesis .configuration import set_hypothesis_home_dir
12
13
13
14
set_hypothesis_home_dir (os .path .join (SAVEDCWD , ".hypothesis" ))
28
29
# of failing examples, and also use a pull-through cache to automatically
29
30
# replay any failing examples discovered in CI. For details on how this
30
31
# works, see https://hypothesis.readthedocs.io/en/latest/database.html
31
- if "CI" not in os .environ :
32
+ # We only do that if a GITHUB_TOKEN env var is provided, see:
33
+ # https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
34
+ # And Python is built with socket support:
35
+ if (
36
+ has_socket_support
37
+ and "CI" not in os .environ
38
+ and "GITHUB_TOKEN" in os .environ
39
+ ):
32
40
from hypothesis .database import (
33
41
GitHubArtifactDatabase ,
34
42
MultiplexedDatabase ,
You can’t perform that action at this time.
0 commit comments