summaryrefslogtreecommitdiff
path: root/math/py-pandas/files
diff options
context:
space:
mode:
authorFrederic Culot <culot@FreeBSD.org>2014-07-24 16:47:21 +0000
committerFrederic Culot <culot@FreeBSD.org>2014-07-24 16:47:21 +0000
commit7a9ab3fd2f94a2d72a70f1dfa6e714e20423b808 (patch)
treef520b0b6df25371cc52eee6f15ef390fb9884774 /math/py-pandas/files
parent- update to 0.9505 (diff)
- Update to 0.14.1
PR: ports/191857 Submitted by: John W. O'Brien <john@saltant.com> (maintainer)
Notes
Notes: svn path=/head/; revision=362831
Diffstat (limited to 'math/py-pandas/files')
-rw-r--r--math/py-pandas/files/print_skipped.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/math/py-pandas/files/print_skipped.py b/math/py-pandas/files/print_skipped.py
deleted file mode 100644
index 9fb05df64bce..000000000000
--- a/math/py-pandas/files/print_skipped.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/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()))