Add tox test matrix, Makefile targets, and dev extra#11
Open
Riccardo-Maio wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The suite runs on pytest (merged in #10), but there is no matrix runner, no single entry point for the test commands, and nothing CI can invoke yet. This sets up the tox test tooling for Python 2.7 and 3.7, a Makefile, and a
devextra, structured to match the monetate library CI pattern (e.g. monetate-caching) so a follow-up PR can wire it into Jenkins. The Jenkinsfile ships separately.How
tox.ini:py27andpy37environments. Each runspip install -U pip,pip install -e .[test], thenpytest. Django is pinned to the 1.11 series (the last release that runs on both interpreters and still ships thesmart_textandPyLibMCCachesymbols the backend imports).skip_missing_interpreters = Falseso a missing interpreter fails rather than silently passing. No hardcodedbasepython: interpreters are selected byPYENV_VERSION, matching the monetate-caching pattern so the future Jenkins stage can drive it.Makefile:test(default, runspytest),install(pip install -e ., no test deps),install-test(pip install -e '.[test]'),test-tox(tox, the entry point CI will invoke), andclean.setup.py: adds adevextra (pip install -e '.[dev]') that pulls in tox. Noinstall_requiresor library-code changes, and thetestextra is untouched.Next Steps
Validation
make install-test(orpip install -e '.[test]'). Expect the package and pytest to install; on Python 3 themockbackport is correctly skipped.make installinstalls the package alone, without the test deps.make test(orpytest). Expect the 28 existing tests to pass: 21 intests/test_backend.pyand 7 intests/test_protocol.py.make test-tox(ortox) to run the matrix. Expect the same 28 tests to pass on each interpreter. The py27 env has been run this way locally (28 passed). py37 needs libmemcached present so thepylibmcC extension builds.make clean. Expect.pytest_cache,.tox, build/egg-info, and compiled artifacts to be removed.