1. David Black
  2. python junit xml output module

Commits

David Black  committed c0f8eaf

minor style fix ups.

Signed-off-by: David Black <dblack@atlassian.com>

  • Participants
  • Parent commits bac067b
  • Branches master

Comments (0)

Files changed (3)

File junit_xml_output/__init__.py

View file
 import xml.etree.ElementTree as ET
 import xml.dom.minidom
 
-
 __version__ = "0.0.2"
 
+
 class JunitXml(object):
 	""" A class which is designed to create a junit test xml file.
 	    Note: currently this class is designed to return the junit xml file
 			case.is_failure()])
 
 	def build_junit_xml(self):
-		""" create the xml tree from the given testsuite name and testcase """
+		""" create the xml tree from the given testsuite name and
+		    testcase
+		"""
 		for case in self.test_cases:
 			test_case_element = ET.SubElement(self.root,
 				"testcase", {"name" : unicode(case.name)})
 			out = dom.toprettyxml()
 		return out
 
+
 class TestCase(object):
 	""" A junit test case representation class.
             The JunitXml accepts a set of these and uses them to create

File junit_xml_output/test.py

View file
 		junit = JunitXml("demo test example", test_cases)
 		self.assertEqual(junit.total_tests, 5)
 		self.assertEqual(junit.total_failures, 3)
-		junit.dump()
+		self.assertTrue(junit.dump())
+
 
 if __name__ == "__main__":
 	unittest.main()

File setup.py

View file
 from setuptools import setup, find_packages
 import os
 
+
 def read(fname):
 	return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
 setup(name='junit_xml_output',
-	author='David Black',
-	author_email='dblack@atlassian.com',
-	url='https://bitbucket.org/db_atlass/python-junit-xml-output-module',
-	packages=find_packages(),
-	description=read('README.md'),
-	long_description=read('README.md'),
+	author = 'David Black',
+	author_email = 'dblack@atlassian.com',
+	url = 'https://bitbucket.org/db_atlass/python-junit-xml-output-module',
+	packages = find_packages(),
+	description = read('README.md'),
+	long_description = read('README.md'),
 	license = "MIT",
 	version = __import__('junit_xml_output').__version__,
 	test_suite = 'junit_xml_output.test',