diff options
author | Aarni Koskela <akx@iki.fi> | 2015-12-21 00:43:39 +0200 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2015-12-21 10:52:23 +0200 |
commit | 9ab038fb0556d20788397a450f52f6cd6e94b6c7 (patch) | |
tree | 842cd145c140cb82d56ec6679049aee77de4c459 | |
parent | cc02cd1e936d632897ca4df3bef2adb4b1cd50c0 (diff) | |
download | babel-9ab038fb0556d20788397a450f52f6cd6e94b6c7.tar.gz |
Test/CI: Add requisite doctest flags; ignore setup.py and venvs
This requires a newer version of py.test, so the requirement is pinned in
the CI configuration.
See https://pytest.org/latest/doctest.html
See https://pytest.org/latest/example/pythoncollection.html#customizing-test-collection-to-find-all-py-files
-rw-r--r-- | .ci/appveyor.yml | 3 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | conftest.py | 2 | ||||
-rw-r--r-- | setup.cfg | 3 |
5 files changed, 8 insertions, 4 deletions
diff --git a/.ci/appveyor.yml b/.ci/appveyor.yml index 67ca84b..5a9fd00 100644 --- a/.ci/appveyor.yml +++ b/.ci/appveyor.yml @@ -43,7 +43,8 @@ install: - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" # Build data files - - "pip install . pytest" + - "pip install --upgrade pytest==2.8.5" + - "pip install --editable ." - "python setup.py import_cldr" build: false # Not a C# project, build stuff at the test step instead. @@ -17,3 +17,4 @@ babel/global.dat tests/messages/data/project/i18n/long_messages.pot tests/messages/data/project/i18n/temp.pot tests/messages/data/project/i18n/en_US +/venv* diff --git a/.travis.yml b/.travis.yml index d25ad5f..7bf5e9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ sudo: false cache: directories: - cldr + - "$HOME/.cache/pip" matrix: include: @@ -75,7 +76,7 @@ matrix: install: - bash .ci/deps.${TRAVIS_OS_NAME}.sh - pip install --upgrade pip - - pip install --allow-external cdecimal pytest pytest-cov $CDECIMAL + - pip install --allow-external cdecimal --upgrade pytest==2.8.5 pytest-cov==2.2.0 $CDECIMAL - pip install --editable . script: diff --git a/conftest.py b/conftest.py index 55e27a2..15a589a 100644 --- a/conftest.py +++ b/conftest.py @@ -6,7 +6,7 @@ from py.path import local PY2 = sys.version_info[0] < 3 -collect_ignore = ['tests/messages/data'] +collect_ignore = ['tests/messages/data', 'setup.py'] def pytest_collect_file(path, parent): @@ -2,7 +2,8 @@ release = sdist bdist_wheel [pytest] -norecursedirs = .* _* scripts {args} +norecursedirs = venv* .* _* scripts {args} +doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE ALLOW_UNICODE [bdist_wheel] universal = 1 |