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

Fix test incompatibility with Python 3.7 and bump travis versions #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ notifications:
on_success: change
on_failure: always

dist: xenial
language: python
python:
- "2.6"
Expand All @@ -11,15 +12,14 @@ python:
- "3.4"
- "3.5"
- "3.6"
- "3.6-dev"
- "3.7-dev"
- "3.7"
- "3.8-dev"
- "nightly"

matrix:
allow_failures:
- python: "nightly"
- python: "3.7-dev"
- python: "3.6-dev"
- python: "3.8-dev"

script:
# setuptools only supports py 3.3 up to version 39
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Testing',
'Topic :: Utilities',
]
Expand Down
8 changes: 6 additions & 2 deletions tests/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,13 @@ def test_repr():


def test_repr_with_exception():
exception = ValueError("something is wrong")
obs = Observation("an observation")
obs.set_exception(ValueError("something is wrong"))
assert repr(obs) == """Observation(name='an observation', value=Unrecorded, exception=ValueError('something is wrong',))"""
obs.set_exception(exception)
expected_repr = "Observation(name='an observation', value=Unrecorded, exception={})".format(
repr(exception)
)
assert repr(obs) == expected_repr


def test_functions_executed_in_random_order():
Expand Down