File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ matrix:
1010 include :
1111 - python : 2.7
1212 env : NPY_SEPARATE_COMPILATION=0
13- - python : 3.2
13+ - python : 3.3
1414 env : NPY_SEPARATE_COMPILATION=0
15+ - python : 2.7
16+ env : NPY_RELAXED_STRIDES_CHECKING=1
17+ - python : 3.3
18+ env : NPY_RELAXED_STRIDES_CHECKING=1
1519before_install :
1620 - uname -a
1721 - free -m
Original file line number Diff line number Diff line change 1212# But, python2.4's -m switch only works with top-level modules, not modules
1313# that are inside packages. So, once we drop 2.4 support, maybe...
1414
15- import sys
15+ import sys , os
1616# In case we are run from the source directory, we don't want to import numpy
1717# from there, we want to import the installed version:
1818sys .path .pop (0 )
3535(options , args ) = parser .parse_args ()
3636
3737import numpy
38+
39+ # Check that NPY_RELAXED_STRIDES_CHECKING is active when set.
40+ # The same flags check is also used in the tests to switch behavior.
41+ if (os .environ .get ('NPY_RELAXED_STRIDES_CHECKING' , "0" ) != "0" ):
42+ if not numpy .ones ((10 ,1 ), order = 'C' ).flags .f_contiguous :
43+ print ('NPY_RELAXED_STRIDES_CHECKING set, but not active.' )
44+ sys .exit (1 )
45+ elif numpy .ones ((10 ,1 ), order = 'C' ).flags .f_contiguous :
46+ print ('NPY_RELAXED_STRIDES_CHECKING not set, but active.' )
47+ sys .exit (1 )
48+
3849result = numpy .test (options .mode ,
3950 verbose = options .verbose ,
4051 extra_argv = args ,
You can’t perform that action at this time.
0 commit comments