Skip to content

Commit f084cb8

Browse files
committed
skip doctests on 32 bits
1 parent 776e53b commit f084cb8

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ CYTHON ?= cython
77
NOSETESTS ?= nosetests
88
CTAGS ?= ctags
99

10+
# skip doctests on 32bit python
11+
BITS := $(shell python -c 'import struct; print(8 * struct.calcsize("P"))')
12+
13+
ifeq ($(BITS),32)
14+
NOSETESTS:=$(NOSETESTS) -c setup32.cfg
15+
endif
16+
17+
1018
all: clean inplace test
1119

1220
clean-ctags:
@@ -28,9 +36,11 @@ test-code: in
2836
test-sphinxext:
2937
$(NOSETESTS) -s -v doc/sphinxext/
3038
test-doc:
39+
ifeq ($(BITS),64)
3140
$(NOSETESTS) -s -v doc/*.rst doc/modules/ doc/datasets/ \
3241
doc/developers doc/tutorial/basic doc/tutorial/statistical_inference \
3342
doc/tutorial/text_analytics
43+
endif
3444

3545
test-coverage:
3646
rm -rf coverage .coverage

setup32.cfg

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This config file is here to skip doctests on 32bit linux when running make or make test
2+
# For newer versions of nose, we can simply use "NOSE_IGNORE_CONFIG_FILES", which
3+
# we should do in the future.
4+
5+
[aliases]
6+
# python2.7 has upgraded unittest and it is no longer compatible with some
7+
# of our tests, so we run all through nose
8+
test = nosetests
9+
10+
[nosetests]
11+
# nosetests skips test files with the executable bit by default
12+
# which can silently hide failing tests.
13+
# There are no executable scripts within the scikit-learn project
14+
# so let's turn the --exe flag on to avoid skipping tests by
15+
# mistake.
16+
exe = 1
17+
cover-html = 1
18+
cover-html-dir = coverage
19+
cover-package = sklearn
20+
21+
detailed-errors = 1
22+
with-doctest = 0

0 commit comments

Comments
 (0)