forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
176 lines (162 loc) · 5.66 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[tox]
envlist = studio,lms-1,lms-2,mte,legacy-amc-tests,common,db-migrations,pep8
# This is needed to prevent the lms, cms, and openedx packages inside the "Open
# edX" package (defined in setup.py) from getting installed into site-packages
# where they can get imported, which is bad because those won't even contain
# most of the source code since we don't explicitly add anything to the source
# distribution.
skipsdist=True
# The default toxworkdir is in the source tree (as ".tox/"), but `django-admin
# compilemessages` unconditionally walks the entire directory tree under the
# source root and cannot handle encountering the toxworkdir. So, we un-break
# compilemessages by moving the toxworkdir to the home directory.
toxworkdir={env:TOX_WORKDIR:{homedir}/edxapp_toxenv}
[testenv]
basepython=python3.5
# TODO: Remove tox-pip-version once we upgrade to Koa+, or whenever we have addressed pip 20.3 strict issues.
pip_version=pip==20.2.4
# This ensures "-e ." is installed, so that a link back to the top-level
# edx-platform source directory is installed in site-packages, making
# edx-platform source code importable from python subprocesses. Child
# processes running python code do not import from the current working
# directory without hacking sys.path, but they will inherit the tox virtualenv
# and look in site-packages.
usedevelop=True
setenv =
PYTHONHASHSEED=0
TOXENV={envname}
PYTEST_ARGS={env:PYTEST_ARGS:}
TEST_ENABLE_TIERS_APP=true
passenv =
BOK_CHOY_CMS_PORT
BOKCHOY_HEADLESS
BOK_CHOY_HOSTNAME
BOK_CHOY_LMS_PORT
DISABLE_COURSEENROLLMENT_HISTORY
DISPLAY
DJANGO_SETTINGS_MODULE
EDXAPP_TEST_MONGO_HOST
EDX_PLATFORM_SETTINGS
JOB_NAME
LMS_CFG
REVISION_CFG
MOZ_HEADLESS
NODE_PATH
NODE_VIRTUAL_ENV
NO_PREREQ_INSTALL
NO_PYTHON_UNINSTALL
NPM_CONFIG_PREFIX
PYTHON_VERSION
SCRAPY_SETTINGS_MODULE
SELENIUM_BROWSER
SELENIUM_HOST
SELENIUM_PORT
SHARD
SKIP_NPM_INSTALL
SSH_AUTH_SOCK
STUDIO_CFG
SUBSET_JOB
TARGET_BRANCH
TEST_SUITE
TEST_APPSEMBLER_MULTI_TENANT_EMAILS
XDIST_GIT_BRANCH
XDIST_GIT_REFSPEC
XDIST_INSTANCE_TYPE
XDIST_NUM_WORKERS
XDIST_REMOTE_NUM_PROCESSES
XDIST_WORKER_AMI
XDIST_WORKER_IAM_PROFILE_ARN
XDIST_WORKER_KEY_NAME
XDIST_WORKER_SECURITY_GROUP
XDIST_WORKER_SUBNET
deps =
-r{toxinidir}/requirements/edx/django.txt
-r{toxinidir}/requirements/edx/testing.txt
-r{toxinidir}/requirements/edx/appsembler.txt
whitelist_externals =
/bin/bash
/bin/echo
/usr/bin/echo
/bin/tar
/usr/bin/curl
[testenv:paver-pep8] # Now ignored and kept disabled in favor of plain the `pep8` environment.
commands =
paver run_pep8
[testenv:common]
commands =
pytest {env:PYTEST_ARGS} \
common/djangoapps/student/ \
common/djangoapps/third_party_auth/ \
common/djangoapps/track/ \
common/djangoapps/util/tests/test_milestones_helpers.py \
common/djangoapps/xblock_django/ \
common/lib/xmodule/xmodule/modulestore/tests/test_split_mongo_mongo_connection.py \
common/lib/xmodule/xmodule/modulestore/tests/test_tahoe_changes_for_django_modulestore.py \
common/lib/xmodule/xmodule/tests/test_course_module.py \
common/lib/xmodule/xmodule/tests/test_lti20_unit.py \
common/lib/xmodule/xmodule/tests/test_lti_unit.py \
openedx/core/djangoapps/course_groups/
[testenv:studio]
commands =
pytest {env:PYTEST_ARGS} \
cms/tests.py \
cms/djangoapps/appsembler \
cms/djangoapps/appsembler_tiers/ \
cms/djangoapps/course_creators/ \
cms/djangoapps/contentstore/
[testenv:lms-1]
commands =
pytest {env:PYTEST_ARGS} \
lms/tests.py \
lms/djangoapps/certificates/tests/test_webview_appsembler_changes.py \
lms/djangoapps/course_api/ \
lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py \
lms/djangoapps/courseware/tests/test_access.py \
lms/djangoapps/courseware/tests/test_access_control_backends.py \
lms/djangoapps/courseware/tests/test_navigation.py \
lms/djangoapps/discussion/django_comment_client/ \
lms/djangoapps/grades/ \
lms/djangoapps/instructor/ \
lms/djangoapps/verify_student/tests/test_services.py \
openedx/core/djangoapps/appsembler \
openedx/core/djangoapps/site_configuration/
[testenv:lms-2]
commands =
pytest {env:PYTEST_ARGS} \
lms/djangoapps/tests/ \
openedx/core/djangoapps/credentials/tests/test_tahoe_utils.py \
openedx/core/djangoapps/user_api/ \
openedx/core/djangoapps/user_authn/ \
openedx/features/course_experience/utils.py \
lms/djangoapps/certificates/tests/
[testenv:mte]
setenv =
PYTHONHASHSEED=0
TOXENV={envname}
PYTEST_ARGS={env:PYTEST_ARGS:}
TEST_APPSEMBLER_MULTI_TENANT_EMAILS=true
commands =
pytest {env:PYTEST_ARGS} {posargs:openedx/core/djangoapps/appsembler/multi_tenant_emails}
[testenv:db-migrations]
commands =
pytest {env:PYTEST_ARGS} \
common/djangoapps/util/tests/test_db.py::MigrationTests
[testenv:legacy-amc-tests]
# Keep this until all AMC-related code is gone.
setenv =
PYTHONHASHSEED=0
TOXENV={envname}
PYTEST_ARGS={env:PYTEST_ARGS:}
TEST_TAHOE_SITES_USE_ORGS_MODELS=true
TEST_ENABLE_TIERS_APP=true
commands =
pip install https://github.com/appsembler/edx-organizations/archive/5.2.0-appsembler14.tar.gz
pytest {env:PYTEST_ARGS} {posargs:openedx/core/djangoapps/appsembler/tahoe_tiers/tests/test_legacy_amc_helpers.py}
[testenv:pytest]
commands =
{posargs}
[testenv:pep8]
deps =
pycodestyle==2.3.1
commands =
pycodestyle {posargs:.}