Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis updates #158

Merged
merged 8 commits into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
sudo: false
dist: xenial
language: python
cache: pip

python:
- "2.7"
- "3.5"
- "3.5"
- "3.6"
- "3.7-dev"
- "3.7"
- "nightly"

install:
- pip install -r dev-requirements.txt
- pip install -e .
- pip freeze

script:
- coverage erase
- coverage run --source pykwalify -p -m py.test -v
- flake8 --max-line-length=160 --show-source --statistics --exclude=.venv,.tox,dist,docs,build,.git
- coverage run --source pykwalify -p -m py.test -v -s
- py.test -v -s
- python setup.py sdist bdist

after_success:
- coverage combine
- coveralls
- "if [[ $TEST_PYCODESTYLE == '1' ]]; then pycodestyle --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg,pykwalify_install .; fi"

matrix:
allow_failures:
- python: "nightly"
- python: 2.7
env: TEST_PYCODESTYLE=1
- python: 3.6
env: TEST_PYCODESTYLE=1
8 changes: 5 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
-r requirements.txt

coverage
pytest
testfixtures
pytest>=3.6.0
mock
tox
coveralls
flake8
python-coveralls
ptpdb
ptpython
pysnooper
setuptools
2 changes: 0 additions & 2 deletions tests/files/fail/test_type_float.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ schema:
type: seq
seq:
- type: float
errors:
- "Value 'foo' is not of type 'float'. Path: '/0'"
errors:
- "Value 'True' is not of type 'float'. Path: '/1'"
- "Value 'foo' is not of type 'float'. Path: '/0'"
Expand Down
4 changes: 3 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ def test_multi_file_support(self):
compare(c.root_rule.schema_str, passing_test[2], prefix="Parsed rules is not correct, something have changed...")

for failing_test in failing_tests:
with pytest.raises(failing_test[2], message="Test files: {0} : {1}".format(", ".join(failing_test[0]), failing_test[1])):
print("Test files: {0} : {1}".format(", ".join(failing_test[0]), failing_test[1]))

with pytest.raises(failing_test[2]):
c = Core(schema_files=failing_test[0], source_file=failing_test[1])
c.validate()

Expand Down