Skip to content

Commit 940cde1

Browse files
committed
split out test scripts
1 parent ff575f4 commit 940cde1

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ python:
44
- "3.7"
55
- "3.8"
66
env:
7-
- POSTGRESQL_VERSION = 11.1
8-
- POSTGRESQL_VERSION = 10.6
9-
- POSTGRESQL_VERSION = 9.6
7+
- POSTGRESQL_VERSION=11.1
8+
- POSTGRESQL_VERSION=10.6
9+
- POSTGRESQL_VERSION=9.6
1010
before_install:
1111
- sudo service postgresql stop && sudo service postgresql start $POSTGRESQL_VERSION
1212
install:
@@ -17,6 +17,6 @@ before_script:
1717
- psql -c "CREATE USER piccolo PASSWORD 'piccolo';" -U postgres
1818
- psql -c "GRANT ALL PRIVILEGES ON DATABASE piccolo TO piccolo;" -U postgres
1919
script:
20-
- cd tests && ./run-tests.sh
20+
- cd tests && ./travis.sh
2121
after_success:
2222
- cd .. && coveralls
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ cd ..
88

99
export PICCOLO_CONF="tests.postgres_conf"
1010
python -m pytest --cov=piccolo -s $@
11-
12-
# export PICCOLO_CONF="tests.sqlite_conf"
13-
# python -m pytest --cov=piccolo -s $@

tests/test-sqlite.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# To run all in a folder tests/
3+
# To run all in a file tests/test_foo.py
4+
# To run all in a class tests/test_foo.py::TestFoo
5+
# To run a single test tests/test_foo.py::TestFoo::test_foo
6+
7+
cd ..
8+
9+
export PICCOLO_CONF="tests.sqlite_conf"
10+
python -m pytest --cov=piccolo -s $@

tests/travis.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
cd ..
4+
5+
export PICCOLO_CONF="tests.postgres_conf"
6+
python -m pytest --cov=piccolo -s $@

0 commit comments

Comments
 (0)