File tree Expand file tree Collapse file tree 5 files changed +33
-7
lines changed
Expand file tree Collapse file tree 5 files changed +33
-7
lines changed Original file line number Diff line number Diff line change 1+ language : python
2+ python :
3+ - 2.7
4+ - 3.7
5+ env :
6+ - FILENAME=test-eslint1
7+ - FILENAME=test-eslint2
8+ - FILENAME=test-eslint3
9+ - FILENAME=test
10+ - FILENAME=test2
11+ - FILENAME=test3
12+ install : pip install flake8 junit-xml yamlish
13+ before_script : flake8 . --count --select=E9,F --show-source --statistics
14+ script :
15+ - python -m tap2junit -i test/fixtures/${FILENAME}.tap -o test/output/${FILENAME}.xml
16+ - cat test/output/${FILENAME}.xml
Original file line number Diff line number Diff line change @@ -10,4 +10,3 @@ junit-xml = "*"
1010[dev-packages ]
1111
1212[requires ]
13- python_version = " 2.7"
Original file line number Diff line number Diff line change 11# coding: utf-8
22
33# Always prefer setuptools over distutils
4- from setuptools import setup , find_packages
4+ from setuptools import setup
55# To use a consistent encoding
66from codecs import open
77from os import path
2626 'Topic :: Software Development :: Build Tools' ,
2727 "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)" ,
2828 'Programming Language :: Python :: 2' ,
29+ 'Programming Language :: Python :: 3' ,
2930 ],
3031 keywords = 'tap13 junit' ,
3132 packages = ['tap2junit' ],
Original file line number Diff line number Diff line change 22import os
33import platform
44from junit_xml import TestSuite , TestCase
5- from tap13 import TAP13 as tap13
5+ from tap2junit . tap13 import TAP13 as tap13
66
77
88def map_yaml_to_junit (test ):
@@ -52,4 +52,4 @@ def main():
5252
5353
5454if __name__ == "__main__" :
55- main ()
55+ main ()
Original file line number Diff line number Diff line change 1717#
1818# Author: Josef Skladanka <jskladan@redhat.com>
1919
20+ from __future__ import print_function
21+
2022import re
23+ try :
24+ from StringIO import StringIO
25+ except ImportError :
26+ from io import StringIO
27+
2128import yamlish
22- import StringIO
2329
30+ try :
31+ basestring
32+ except NameError :
33+ basestring = str
2434
2535
2636RE_VERSION = re .compile (r"^\s*TAP version 13\s*$" )
@@ -144,8 +154,8 @@ def _parse(self, source):
144154
145155
146156 def parse (self , source ):
147- if isinstance (source , ( str , unicode ) ):
148- self ._parse (StringIO . StringIO (source ))
157+ if isinstance (source , basestring ):
158+ self ._parse (StringIO (source ))
149159 elif hasattr (source , "__iter__" ):
150160 self ._parse (source )
151161
You can’t perform that action at this time.
0 commit comments