Skip to content

Revert print_skipped.py changes for now #5308

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ script:

after_script:
- ci/print_versions.py
- ci/print_skipped.py /tmp/nosetests.xml
3 changes: 0 additions & 3 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
time sudo locale-gen "$LOCALE_OVERRIDE"
fi

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

# we need these for numpy
Expand Down
51 changes: 51 additions & 0 deletions ci/print_skipped.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env python

import sys
import math
import xml.etree.ElementTree as et


def parse_results(filename):
tree = et.parse(filename)
root = tree.getroot()
skipped = []

current_class = old_class = ''
i = 1
assert i - 1 == len(skipped)
for el in root.findall('testcase'):
cn = el.attrib['classname']
for sk in el.findall('skipped'):
old_class = current_class
current_class = cn
name = '{classname}.{name}'.format(classname=current_class,
name=el.attrib['name'])
msg = sk.attrib['message']
out = ''
if old_class != current_class:
ndigits = int(math.log(i, 10) + 1)
out += ('-' * (len(name + msg) + 4 + ndigits) + '\n') # 4 for : + space + # + space
out += '#{i} {name}: {msg}'.format(i=i, name=name, msg=msg)
skipped.append(out)
i += 1
assert i - 1 == len(skipped)
assert i - 1 == len(skipped)
assert len(skipped) == int(root.attrib['skip'])
return '\n'.join(skipped)


def main(args):
print('SKIPPED TESTS:')
print(parse_results(args.filename))
return 0


def parse_args():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='XUnit file to parse')
return parser.parse_args()


if __name__ == '__main__':
sys.exit(main(parse_args()))
4 changes: 2 additions & 2 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
python -c "$pycmd"
fi

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