forked from HypothesisWorks/hypothesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasic-test.sh
executable file
·77 lines (56 loc) · 1.69 KB
/
basic-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
set -e -o xtrace
# We run a reduced set of tests on OSX mostly so the CI runs in vaguely
# reasonable time.
if [[ "$(uname -s)" == 'Darwin' ]]; then
DARWIN=true
else
DARWIN=false
fi
python -c '
import os
for k, v in sorted(dict(os.environ).items()):
print("%s=%s" % (k, v))
'
pip install .
PYTEST="python -m pytest"
$PYTEST tests/cover
$PYTEST examples
COVERAGE_TEST_TRACER=timid $PYTEST tests/cover
if [ "$(python -c 'import sys; print(sys.version_info[0] == 2)')" = "True" ] ; then
$PYTEST tests/py2
else
$PYTEST tests/py3
fi
$PYTEST --runpytest=subprocess tests/pytest
pip install ".[datetime]"
$PYTEST tests/datetime/
pip uninstall -y pytz
if [ "$DARWIN" = true ]; then
exit 0
fi
if [ "$(python -c 'import sys; print(sys.version_info[:2] in ((2, 7), (3, 6)))')" = "False" ] ; then
exit 0
fi
for f in tests/nocover/test_*.py; do
$PYTEST "$f"
done
# fake-factory doesn't have a correct universal wheel
pip install --no-binary :all: faker
$PYTEST tests/fakefactory/
pip uninstall -y faker
if [ "$(python -c 'import platform; print(platform.python_implementation())')" != "PyPy" ]; then
if [ "$(python -c 'import sys; print(sys.version_info[0] == 2 or sys.version_info[:2] >= (3, 4))')" == "True" ] ; then
pip install .[django]
HYPOTHESIS_DJANGO_USETZ=TRUE python -m tests.django.manage test tests.django
HYPOTHESIS_DJANGO_USETZ=FALSE python -m tests.django.manage test tests.django
pip uninstall -y django
fi
if [ "$(python -c 'import sys; print(sys.version_info[:2] in ((2, 7), (3, 6)))')" = "True" ] ; then
pip install numpy
$PYTEST tests/numpy
pip install pandas
$PYTEST tests/pandas
pip uninstall -y numpy pandas
fi
fi