Skip to content

Commit 436df7c

Browse files
Merge pull request #651 from nipy/ci/travis_py37
CI: Test on Python 3.7 on Travis and AppVeyor
2 parents be35aca + 25f08b7 commit 436df7c

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
# for it to be on multiple physical lines, so long as you remember: - There
55
# can't be any leading "-"s - All newlines will be removed, so use ";"s
66

7+
dist: xenial
8+
sudo: true
79
language: python
810

9-
# Run jobs on container-based infrastructure, can be overridden per job
10-
sudo: false
11-
1211
cache:
1312
directories:
1413
- $HOME/.cache/pip
@@ -22,11 +21,14 @@ env:
2221
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
2322
- PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS"
2423
python:
25-
- 3.4
2624
- 3.5
2725
- 3.6
26+
- 3.7
2827
matrix:
2928
include:
29+
- python: 3.4
30+
dist: trusty
31+
sudo: false
3032
- python: 2.7
3133
env:
3234
- COVERAGE=1

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ environment:
1212
- PYTHON: C:\Python35-x64
1313
- PYTHON: C:\Python36
1414
- PYTHON: C:\Python36-x64
15+
- PYTHON: C:\Python37
16+
- PYTHON: C:\Python37-x64
1517

1618
install:
1719
# Prepend newly installed Python to the PATH of this build (this cannot be

nibabel/deprecated.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class FutureWarningMixin(object):
5252
5353
>>> with warnings.catch_warnings(record=True) as warns:
5454
... d = D()
55-
... warns[0].message
56-
FutureWarning("Please, don't use this class",)
55+
... warns[0].message.args[0]
56+
"Please, don't use this class"
5757
"""
5858
warn_message = 'This class will be removed in future versions'
5959

nibabel/tests/test_testing.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_assert_allclose_safely():
6464

6565
def assert_warn_len_equal(mod, n_in_context):
6666
mod_warns = mod.__warningregistry__
67-
# Python 3.4 appears to clear any pre-existing warnings of the same type,
67+
# Python 3 appears to clear any pre-existing warnings of the same type,
6868
# when raising warnings inside a catch_warnings block. So, there is a
6969
# warning generated by the tests within the context manager, but no
7070
# previous warnings.
@@ -84,18 +84,15 @@ def test_clear_and_catch_warnings():
8484
assert_equal(my_mod.__warningregistry__, {})
8585
# Without specified modules, don't clear warnings during context
8686
with clear_and_catch_warnings():
87-
warnings.simplefilter('ignore')
8887
warnings.warn('Some warning')
8988
assert_warn_len_equal(my_mod, 1)
9089
# Confirm that specifying module keeps old warning, does not add new
9190
with clear_and_catch_warnings(modules=[my_mod]):
92-
warnings.simplefilter('ignore')
9391
warnings.warn('Another warning')
9492
assert_warn_len_equal(my_mod, 1)
9593
# Another warning, no module spec does add to warnings dict, except on
96-
# Python 3.4 (see comments in `assert_warn_len_equal`)
94+
# Python 3 (see comments in `assert_warn_len_equal`)
9795
with clear_and_catch_warnings():
98-
warnings.simplefilter('ignore')
9996
warnings.warn('Another warning')
10097
assert_warn_len_equal(my_mod, 2)
10198

0 commit comments

Comments
 (0)