Skip to content

WIP: Enh appveyor debug #676

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

Closed
wants to merge 10 commits into from
153 changes: 0 additions & 153 deletions .travis.yml

This file was deleted.

20 changes: 12 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
# CI on Windows via appveyor

environment:

appveyor_build_worker_cloud: gce
matrix:
- PYTHON: C:\Python27
- PYTHON: C:\Python27-x64
- PYTHON: C:\Python34
- PYTHON: C:\Python34-x64
- PYTHON: C:\Python35
- PYTHON: C:\Python35-x64
- PYTHON: C:\Python36
- PYTHON: C:\Python36-x64
- PYTHON: C:\Python37
- PYTHON: C:\Python37-x64

install:
# Prepend newly installed Python to the PATH of this build (this cannot be
Expand All @@ -32,4 +26,14 @@ test_script:
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- nosetests --with-doctest nibabel
# Print Python, numpy versions
- python -c "import sys, numpy; print('Python', sys.version); print('numpy', numpy.__version__)"
# Show all environment variables to ease possible future debugging
- set
- nosetests --with-doctest -s -v nibabel


on_failure:
# enable the next to let the build VM block for up to 60min to log in via RDP and debug
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

7 changes: 7 additions & 0 deletions nibabel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,10 @@ def test(*args, **kwargs):

def get_info():
return _get_pkg_info(os.path.dirname(__file__))

def print_numpy_info():
import numpy as np
print("NUMPY: ID(numpy): %d ID(numpy.float64): %d" % (id(np), id(np.float64)))

def setup_package():
print_numpy_info()
13 changes: 12 additions & 1 deletion nibabel/tests/test_minc1.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
from __future__ import division, print_function, absolute_import
import sys

from os.path import join as pjoin

Expand Down Expand Up @@ -156,7 +157,17 @@ def test_mincfile(self):
for tp in self.test_files:
mnc_obj = self.opener(tp['fname'], 'r')
mnc = self.file_class(mnc_obj)
assert_equal(mnc.get_data_dtype().type, tp['dtype'])
try:
assert_equal(mnc.get_data_dtype().type, tp['dtype'])
except AssertionError:
from nibabel import print_numpy_info
print()
for l, t in (('mnc.get_data_dtype().type', mnc.get_data_dtype().type),
("tp['dtype']", tp['dtype'])):
print("%30s ID: %s, __module__: %s, id(sys[__module__]): %s"
% (l, id(t), t.__module__, id(sys.modules[t.__module__])))
print_numpy_info()
raise
assert_equal(mnc.get_data_shape(), tp['shape'])
assert_equal(mnc.get_zooms(), tp['zooms'])
assert_array_equal(mnc.get_affine(), tp['affine'])
Expand Down