[Python-modules-commits] [python-junit-xml] 01/06: Import python-junit-xml_1.7.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Sat Jun 11 20:05:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository python-junit-xml.

commit 28cb84a33e6baa228bb000fef5838c3856b09f4a
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Jun 11 21:00:57 2016 +0100

    Import python-junit-xml_1.7.orig.tar.gz
---
 PKG-INFO                    |  2 +-
 junit_xml.egg-info/PKG-INFO |  2 +-
 junit_xml/__init__.py       | 30 +++++++++++++++---------------
 setup.py                    |  2 +-
 test_junit_xml.py           |  2 +-
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index 3d9e280..19926f8 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: junit-xml
-Version: 1.6
+Version: 1.7
 Summary: Creates JUnit XML test result documents that can be read by tools such as Jenkins
 Home-page: https://github.com/kyrus/python-junit-xml
 Author: Brian Beyer
diff --git a/junit_xml.egg-info/PKG-INFO b/junit_xml.egg-info/PKG-INFO
index 3d9e280..19926f8 100644
--- a/junit_xml.egg-info/PKG-INFO
+++ b/junit_xml.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: junit-xml
-Version: 1.6
+Version: 1.7
 Summary: Creates JUnit XML test result documents that can be read by tools such as Jenkins
 Home-page: https://github.com/kyrus/python-junit-xml
 Author: Brian Beyer
diff --git a/junit_xml/__init__.py b/junit_xml/__init__.py
index 8e99bd6..f969b4b 100644
--- a/junit_xml/__init__.py
+++ b/junit_xml/__init__.py
@@ -55,9 +55,9 @@ Based on the understanding of what Jenkins can parse for JUnit XML files.
 
 
 def decode(var, encoding):
-    '''
+    """
     If not already unicode, decode it.
-    '''
+    """
     if PY2:
         if isinstance(var, unicode):
             ret = var
@@ -74,9 +74,10 @@ def decode(var, encoding):
 
 
 class TestSuite(object):
-    '''Suite of test cases.
+    """
+    Suite of test cases.
     Can handle unicode strings or binary strings if their encoding is provided.
-    '''
+    """
 
     def __init__(self, name, test_cases=None, hostname=None, id=None,
                  package=None, timestamp=None, properties=None):
@@ -94,14 +95,13 @@ class TestSuite(object):
         self.timestamp = timestamp
         self.properties = properties
 
-
     def build_xml_doc(self, encoding=None):
-        '''
+        """
         Builds the XML document for the JUnit test suite.
         Produces clean unicode strings and decodes non-unicode with the help of encoding.
         @param encoding: Used to decode encoded strings.
         @return: XML document with unicode string elements
-        '''
+        """
 
         # build the test suite element
         test_suite_attributes = dict()
@@ -192,10 +192,11 @@ class TestSuite(object):
 
     @staticmethod
     def to_xml_string(test_suites, prettyprint=True, encoding=None):
-        '''Returns the string representation of the JUnit XML document.
+        """
+        Returns the string representation of the JUnit XML document.
         @param encoding: The encoding of the input.
         @return: unicode string
-        '''
+        """
 
         try:
             iter(test_suites)
@@ -206,7 +207,7 @@ class TestSuite(object):
         attributes = defaultdict(int)
         for ts in test_suites:
             ts_xml = ts.build_xml_doc(encoding=encoding)
-            for key in ['failures', 'errors', 'skipped', 'tests']:
+            for key in ['failures', 'errors', 'tests']:
                 attributes[key] += int(ts_xml.get(key, 0))
             for key in ['time']:
                 attributes[key] += float(ts_xml.get(key, 0))
@@ -233,22 +234,21 @@ class TestSuite(object):
 
     @staticmethod
     def to_file(file_descriptor, test_suites, prettyprint=True, encoding=None):
-        '''
+        """
         Writes the JUnit XML document to a file.
-        '''
+        """
         xml_string = TestSuite.to_xml_string(
             test_suites, prettyprint=prettyprint, encoding=encoding)
         # has problems with encoded str with non-ASCII (non-default-encoding) characters!
         file_descriptor.write(xml_string)
 
-
     @staticmethod
     def _clean_illegal_xml_chars(string_to_clean):
-        '''
+        """
         Removes any illegal unicode characters from the given XML string.
         
         @see: http://stackoverflow.com/questions/1707890/fast-way-to-filter-illegal-xml-unicode-chars-in-python
-        '''
+        """
 
         illegal_unichrs = [
             (0x00, 0x08), (0x0B, 0x1F), (0x7F, 0x84), (0x86, 0x9F),
diff --git a/setup.py b/setup.py
index 6e7134f..c6df5af 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ setup(
     description='Creates JUnit XML test result documents that can be read by '
                 'tools such as Jenkins',
     long_description=read('README.rst'),
-    version='1.6',
+    version='1.7',
     classifiers=[
         'Development Status :: 5 - Production/Stable',
         'Intended Audience :: Developers',
diff --git a/test_junit_xml.py b/test_junit_xml.py
index d3c703e..6956579 100644
--- a/test_junit_xml.py
+++ b/test_junit_xml.py
@@ -222,7 +222,7 @@ class TestSuiteTests(unittest.TestCase):
             self.assertTrue(isinstance(xml_string, unicode))
         expected_xml_string = textwrap.dedent("""
             <?xml version="1.0" ?>
-            <testsuites errors="0" failures="0" skipped="0" tests="2" time="0.0">
+            <testsuites errors="0" failures="0" tests="2" time="0.0">
             \t<testsuite errors="0" failures="0" name="suite1" skipped="0" tests="1" time="0">
             \t\t<testcase name="Test1"/>
             \t</testsuite>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-junit-xml.git



More information about the Python-modules-commits mailing list