10000 Add nox target for django tests · Issue #474 · googleapis/python-spanner-django · GitHub
[go: up one dir, main page]

Skip to content
Add nox target for django tests #474
Closed
@c24t

Description

@c24t

Right now we run django's built in tests in CI using python runtests.py, but it looks like pip-installing django doesn't give us an executable runtests.py without us changing PYTHONPATH.

Kokoro seems to get around this by installing django from source, from @timgraham's fork:

mkdir -p $DJANGO_TESTS_DIR && git clone --depth 1 --single-branch --branch spanner-2.2.x https://github.com/timgraham/django.git $DJANGO_TESTS_DIR/django

Running the existing tox target (from 11222db) doesn't appear to work:

.../python-spanner-django/.tox/py37-django22/bin/python: can't open file 'runtests.py': [Errno 2] No such file or directory
ERROR: InvocationError for command .../python-spanner-django/.tox/py37-django22/bin/python runtests.py (exited with code 2)
ERROR:   py37-django22: commands failed

Since @mf2199 replaced tox with nox in #468, we need a nox target to run the built-in django tests. This target shouldn't depend on kokoro scripts (like django_test_suite.sh does now), and the existing scripts should be changed to remove dependencies on the fork if possible.

See also #471.

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner-django API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0