Skip to content

Commit 006f522

Browse files
committed
Revert print_skipped.py changes for now
Just until cpcloud has time. Revert "CLN: remove print_skipped.py" This reverts commit 2c1e5ba. Revert "CI/CLN: remove print_skipped.py line" This reverts commit ac0ce3c.
1 parent d6378c4 commit 006f522

File tree

4 files changed

+54
-5
lines changed

4 files changed

+54
-5
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ script:
4848

4949
after_script:
5050
- ci/print_versions.py
51+
- ci/print_skipped.py /tmp/nosetests.xml

ci/install.sh

-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
5555
time sudo locale-gen "$LOCALE_OVERRIDE"
5656
fi
5757

58-
# show-skipped is working at this particular commit
59-
show_skipped_commit=fa4ff84e53c09247753a155b428c1bf2c69cb6c3
60-
time pip install git+git://github.com/cpcloud/nose-show-skipped.git@$show_skipped_commit
6158
time pip install $PIP_ARGS -r ci/requirements-${wheel_box}.txt
6259

6360
# we need these for numpy

ci/print_skipped.py

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
import math
5+
import xml.etree.ElementTree as et
6+
7+
8+
def parse_results(filename):
9+
tree = et.parse(filename)
10+
root = tree.getroot()
11+
skipped = []
12+
13+
current_class = old_class = ''
14+
i = 1
15+
assert i - 1 == len(skipped)
16+
for el in root.findall('testcase'):
17+
cn = el.attrib['classname']
18+
for sk in el.findall('skipped'):
19+
old_class = current_class
20+
current_class = cn
21+
name = '{classname}.{name}'.format(classname=current_class,
22+
name=el.attrib['name'])
23+
msg = sk.attrib['message']
24+
out = ''
25+
if old_class != current_class:
26+
ndigits = int(math.log(i, 10) + 1)
27+
out += ('-' * (len(name + msg) + 4 + ndigits) + '\n') # 4 for : + space + # + space
28+
out += '#{i} {name}: {msg}'.format(i=i, name=name, msg=msg)
29+
skipped.append(out)
30+
i += 1
31+
assert i - 1 == len(skipped)
32+
assert i - 1 == len(skipped)
33+
assert len(skipped) == int(root.attrib['skip'])
34+
return '\n'.join(skipped)
35+
36+
37+
def main(args):
38+
print('SKIPPED TESTS:')
39+
print(parse_results(args.filename))
40+
return 0
41+
42+
43+
def parse_args():
44+
import argparse
45+
parser = argparse.ArgumentParser()
46+
parser.add_argument('filename', help='XUnit file to parse')
47+
return parser.parse_args()
48+
49+
50+
if __name__ == '__main__':
51+
sys.exit(main(parse_args()))

ci/script.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
99
python -c "$pycmd"
1010
fi
1111

12-
echo nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas --show-skipped
13-
nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas --show-skipped
12+
echo nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml
13+
nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml

0 commit comments

Comments
 (0)