forked from HypothesisWorks/hypothesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase-test.sh
executable file
·23 lines (20 loc) · 1010 Bytes
/
database-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
set -e -o xtrace
export PYTHONDONTWRITEBYTECODE=x
export HYPOTHESIS_DATABASE_FILE=$(mktemp --suffix=.db)
PYTHONPATH=src python -u -m coverage run -a --branch --include 'src/hypothesis/*' --omit 'src/hypothesis/settings.py,src/hypothesis/internal/compat.py' $(which py.test) -v tests --ignore=tests/test_recursively.py
PYTHONPATH=src python -c '
from __future__ import print_function
from hypothesis.database import ExampleDatabase
from hypothesis.database.backend import SQLiteBackend
import os
import sys
database_file = os.getenv("HYPOTHESIS_DATABASE_FILE")
print("Database file is", database_file)
db = ExampleDatabase(
backend=SQLiteBackend(database_file))
data = list(db.storage_for((((int,), {}),)).fetch())
if not data:
print("No integer examples in database")
sys.exit(1)
'
PYTHONPATH=src python -u -m coverage run -a --branch --include 'src/hypothesis/*' --omit 'src/hypothesis/settings.py,src/hypothesis/internal/compat.py' $(which py.test) -v tests --ignore=tests/test_recursively.py