]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Test/CI: Add requisite doctest flags; ignore setup.py and venvs
authorAarni Koskela <akx@iki.fi>
Sun, 20 Dec 2015 22:43:39 +0000 (00:43 +0200)
committerAarni Koskela <akx@iki.fi>
Mon, 21 Dec 2015 08:52:23 +0000 (10:52 +0200)
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

.ci/appveyor.yml
.gitignore
.travis.yml
conftest.py
setup.cfg

index 67ca84b14ca75742319bdbd0d877302bb8c2278b..5a9fd008bf7506dbb467c7b5907054ba464a6f0f 100644 (file)
@@ -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.
index 0006e76c9f07f4e01460bceec3d6b6a028c31f14..7c27f0e605fa3539738164761de24bab0e5214f9 100644 (file)
@@ -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*
index d25ad5f2bf31868b10733cd447174b6a60f70525..7bf5e9c4d92a7116862282f2db0825605e8cab30 100644 (file)
@@ -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:
index 55e27a2cad3d371b29c195134eb7a579ce175268..15a589a6c17fe9067f0e493716018914e70bb02e 100644 (file)
@@ -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):
index 38a441db4959be9d4037713928dc9f5b4445fb4e..8069749f56c24d88f05763a06f2f8c342b234db2 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -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