-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
56 lines (51 loc) · 1.45 KB
/
tox.ini
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
# QUICK TIPS
# ==========
#
# Run all tests for all environments from the command line:
# $ tox
#
#
# Run all tests for a single environment from the command line:
# $ tox -e flake8
# or:
# $ tox -e py34
#
#
# Run only tests that match a substring expression, for a single environment:
# $ tox -e py34 -- -k expression
#
#
# In general, everything after the "--" is passed as arguments to py.test:
# $ tox -- -s -v -k expression
#
[tox]
envlist=flake8,py34
skipsdist=True
[testenv]
setenv=
SIDEBOARD_CONFIG_OVERRIDES=test-defaults.ini
deps= -rrequirements_test.txt
whitelist_externals=
/bin/bash
/bin/ln
/bin/rm
commands=
# "install" uber & magstock in plugins dir by creating symbolic links
rm -f {envdir}/src/sideboard/plugins/uber
rm -f {envdir}/src/sideboard/plugins/magstock
ln -s {envdir}/src/uber {envdir}/src/sideboard/plugins/uber
ln -s {toxinidir} {envdir}/src/sideboard/plugins/magstock
# add uber as a priority plugin to our test configuration
rm -f {envdir}/src/sideboard/test.ini
bash -c "echo 'priority_plugins = uber,' > '{envdir}/src/sideboard/test.ini'"
# run actual tests
coverage run --source magstock -m py.test {posargs}
coverage report --show-missing
# clean up after ourselves
rm -f {envdir}/src/sideboard/plugins/uber
rm -f {envdir}/src/sideboard/plugins/magstock
rm -f {envdir}/src/sideboard/test.ini
[testenv:flake8]
deps=flake8
commands=
flake8 magstock/ tests/