Skip to content

Commit

Permalink
Merge 78c7b62 into b6e8117
Browse files Browse the repository at this point in the history
  • Loading branch information
Grokzen committed Oct 9, 2019
2 parents b6e8117 + 78c7b62 commit 769126a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
17 changes: 13 additions & 4 deletions .travis.yml
@@ -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
@@ -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
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
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

0 comments on commit 769126a

Please sign in to comment.