Ensure the unexpected success works in python3
And ensure there is coverage for unexpected success in both python3 and 2 and in travis.
This commit is contained in:
parent
b23b5e9cb3
commit
981363376e
|
@ -12,6 +12,9 @@ env:
|
|||
- TOXENV=pypy
|
||||
- TOXENV=pypy3
|
||||
- TOXENV=pep8
|
||||
- TOXENV=py34-failskip
|
||||
- TOXENV=py34-limit
|
||||
- TOXENV=py34-prefix
|
||||
|
||||
notifications:
|
||||
irc: "chat.freenode.net#gabbi"
|
||||
|
|
|
@ -76,6 +76,9 @@ def potentialFailure(func):
|
|||
raise case._ExpectedFailure(sys.exc_info())
|
||||
else:
|
||||
self._addExpectedFailure(self.result, sys.exc_info())
|
||||
else:
|
||||
if hasattr(self, '_addUnexpectedSuccess'):
|
||||
self._addUnexpectedSuccess(self.result)
|
||||
else:
|
||||
raise case._UnexpectedSuccess
|
||||
else:
|
||||
|
|
|
@ -12,6 +12,11 @@ tests:
|
|||
url: /
|
||||
verbose: True
|
||||
|
||||
- name: get simple page xfail uxsuccess
|
||||
xfail: true
|
||||
url: /
|
||||
verbose: True
|
||||
|
||||
- name: inheritance of defaults
|
||||
response_headers:
|
||||
x-gabbi-url: $SCHEME://$NETLOC/cow?alpha=1
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash -e
|
||||
# Run the tests and confirm that the stuff we expect to skip or fail
|
||||
# does.
|
||||
|
||||
GREP_FAIL_MATCH='expected failures=8'
|
||||
GREP_SKIP_MATCH='skips=2'
|
||||
GREP_SKIP_MATCH='skipped=2'
|
||||
GREP_UXSUC_MATCH='unexpected successes=1'
|
||||
|
||||
python setup.py testr && \
|
||||
for match in "${GREP_FAIL_MATCH}" "${GREP_UXSUC_MATCH}" "${GREP_SKIP_MATCH}"; do
|
||||
testr last --subunit | subunit2pyunit 2>&1 | \
|
||||
grep "${GREP_FAIL_MATCH}" && \
|
||||
testr last | grep "${GREP_SKIP_MATCH}"
|
||||
grep "${match}"
|
||||
done
|
||||
|
|
8
tox.ini
8
tox.ini
|
@ -1,7 +1,7 @@
|
|||
[tox]
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
envlist = py27,py33,py34,py35,pypy,pypy3,pep8,limit,failskip,docs,py34-prefix
|
||||
envlist = py27,py33,py34,py35,pypy,pypy3,pep8,limit,failskip,docs,py34-prefix,py34-limit,py34-failskip
|
||||
|
||||
[testenv]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
|
@ -29,6 +29,12 @@ commands = {toxinidir}/test-limit.sh
|
|||
[testenv:failskip]
|
||||
commands = {toxinidir}/test-failskip.sh
|
||||
|
||||
[testenv:py34-limit]
|
||||
commands = {toxinidir}/test-limit.sh
|
||||
|
||||
[testenv:py34-failskip]
|
||||
commands = {toxinidir}/test-failskip.sh
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py testr --coverage --testr-args="{posargs}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue