junitparser 3.1.1__tar.gz → 3.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {junitparser-3.1.1 → junitparser-3.1.2}/PKG-INFO +8 -8
  2. {junitparser-3.1.1 → junitparser-3.1.2}/README.rst +7 -7
  3. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser/__init__.py +1 -1
  4. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser/junitparser.py +8 -5
  5. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser.egg-info/PKG-INFO +8 -8
  6. {junitparser-3.1.1 → junitparser-3.1.2}/LICENSE +0 -0
  7. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser/__main__.py +0 -0
  8. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser/cli.py +0 -0
  9. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser/py.typed +0 -0
  10. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser/xunit2.py +0 -0
  11. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser.egg-info/SOURCES.txt +0 -0
  12. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser.egg-info/dependency_links.txt +0 -0
  13. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser.egg-info/entry_points.txt +0 -0
  14. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser.egg-info/not-zip-safe +0 -0
  15. {junitparser-3.1.1 → junitparser-3.1.2}/junitparser.egg-info/top_level.txt +0 -0
  16. {junitparser-3.1.1 → junitparser-3.1.2}/pyproject.toml +0 -0
  17. {junitparser-3.1.1 → junitparser-3.1.2}/setup.cfg +0 -0
  18. {junitparser-3.1.1 → junitparser-3.1.2}/setup.py +0 -0
  19. {junitparser-3.1.1 → junitparser-3.1.2}/tests/test_cli.py +0 -0
  20. {junitparser-3.1.1 → junitparser-3.1.2}/tests/test_fromfile.py +0 -0
  21. {junitparser-3.1.1 → junitparser-3.1.2}/tests/test_general.py +0 -0
  22. {junitparser-3.1.1 → junitparser-3.1.2}/tests/test_xunit2.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junitparser
3
- Version: 3.1.1
3
+ Version: 3.1.2
4
4
  Summary: Manipulates JUnit/xUnit Result XML files
5
5
  Home-page: https://github.com/weiwei/junitparser
6
6
  Author: Weiwei Wang
@@ -28,12 +28,12 @@ existing Result XML files, or create new JUnit/xUnit result XMLs from scratch.
28
28
  Features
29
29
  --------
30
30
 
31
- * Parse or modify existing JUnit/xUnit xml files.
32
- * Parse or modify non-standard or customized JUnit/xUnit xml files, by monkey
31
+ * Parse or modify existing JUnit/xUnit XML files.
32
+ * Parse or modify non-standard or customized JUnit/xUnit XML files, by monkey
33
33
  patching existing element definitions.
34
34
  * Create JUnit/xUnit test results from scratch.
35
- * Merge test result xml files.
36
- * Specify xml parser. For example you can use lxml to speed things up.
35
+ * Merge test result XML files.
36
+ * Specify XML parser. For example you can use lxml to speed things up.
37
37
  * Invoke from command line, or `python -m junitparser`
38
38
  * Python 2 and 3 support (As of Nov 2020, 1/4 of the users are still on Python
39
39
  2, so there is no plan to drop Python 2 support)
@@ -41,7 +41,7 @@ Features
41
41
  Note on version 2
42
42
  -----------------
43
43
 
44
- Version 2 improved support for pytest result xml files by fixing a few issues,
44
+ Version 2 improved support for pytest result XML files by fixing a few issues,
45
45
  notably that there could be multiple <Failure> or <Error> entries. There is a
46
46
  breaking change that ``TestCase.result`` is now a list instead of a single item.
47
47
  If you are using this attribute, please update your code accordingly.
@@ -149,7 +149,7 @@ Schema Support
149
149
  ~~~~~~~~~~~~~~~
150
150
 
151
151
  By default junitparser supports the schema of windyroad_, which is a relatively
152
- simple schema.
152
+ simple schema.
153
153
 
154
154
  .. _windyroad: https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd
155
155
 
@@ -295,7 +295,7 @@ Command Line
295
295
  Test
296
296
  ----
297
297
 
298
- The tests are written with python `unittest`, to run them, use pytest::
298
+ The tests are written with python ``unittest``, to run them, use pytest::
299
299
 
300
300
  pytest test.py
301
301
 
@@ -12,12 +12,12 @@ existing Result XML files, or create new JUnit/xUnit result XMLs from scratch.
12
12
  Features
13
13
  --------
14
14
 
15
- * Parse or modify existing JUnit/xUnit xml files.
16
- * Parse or modify non-standard or customized JUnit/xUnit xml files, by monkey
15
+ * Parse or modify existing JUnit/xUnit XML files.
16
+ * Parse or modify non-standard or customized JUnit/xUnit XML files, by monkey
17
17
  patching existing element definitions.
18
18
  * Create JUnit/xUnit test results from scratch.
19
- * Merge test result xml files.
20
- * Specify xml parser. For example you can use lxml to speed things up.
19
+ * Merge test result XML files.
20
+ * Specify XML parser. For example you can use lxml to speed things up.
21
21
  * Invoke from command line, or `python -m junitparser`
22
22
  * Python 2 and 3 support (As of Nov 2020, 1/4 of the users are still on Python
23
23
  2, so there is no plan to drop Python 2 support)
@@ -25,7 +25,7 @@ Features
25
25
  Note on version 2
26
26
  -----------------
27
27
 
28
- Version 2 improved support for pytest result xml files by fixing a few issues,
28
+ Version 2 improved support for pytest result XML files by fixing a few issues,
29
29
  notably that there could be multiple <Failure> or <Error> entries. There is a
30
30
  breaking change that ``TestCase.result`` is now a list instead of a single item.
31
31
  If you are using this attribute, please update your code accordingly.
@@ -133,7 +133,7 @@ Schema Support
133
133
  ~~~~~~~~~~~~~~~
134
134
 
135
135
  By default junitparser supports the schema of windyroad_, which is a relatively
136
- simple schema.
136
+ simple schema.
137
137
 
138
138
  .. _windyroad: https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd
139
139
 
@@ -279,7 +279,7 @@ Command Line
279
279
  Test
280
280
  ----
281
281
 
282
- The tests are written with python `unittest`, to run them, use pytest::
282
+ The tests are written with python ``unittest``, to run them, use pytest::
283
283
 
284
284
  pytest test.py
285
285
 
@@ -14,4 +14,4 @@ from .junitparser import (
14
14
  FloatAttr,
15
15
  )
16
16
 
17
- version = "3.1.1"
17
+ version = "3.1.2"
@@ -11,6 +11,7 @@ See the documentation for other supported schemas.
11
11
 
12
12
  import itertools
13
13
  from copy import deepcopy
14
+ from typing import List
14
15
 
15
16
  try:
16
17
  from lxml import etree
@@ -314,6 +315,7 @@ class TestCase(Element):
314
315
  name = Attr()
315
316
  classname = Attr()
316
317
  time = FloatAttr()
318
+ __test__ = False
317
319
 
318
320
  def __init__(self, name: str = None, classname: str = None, time: float = None):
319
321
  super().__init__(self._tag)
@@ -489,6 +491,7 @@ class TestSuite(Element):
489
491
  failures = IntAttr()
490
492
  errors = IntAttr()
491
493
  skipped = IntAttr()
494
+ __test__ = False
492
495
 
493
496
  def __init__(self, name=None):
494
497
  super().__init__(self._tag)
@@ -552,7 +555,7 @@ class TestSuite(Element):
552
555
  result.add_testsuite(other)
553
556
  return result
554
557
 
555
- def remove_testcase(self, testcase):
558
+ def remove_testcase(self, testcase: TestCase):
556
559
  """Remove testcase *testcase* from the testsuite."""
557
560
  for case in self:
558
561
  if case == testcase:
@@ -580,7 +583,7 @@ class TestSuite(Element):
580
583
  self.skipped = skipped
581
584
  self.time = round(time, 3)
582
585
 
583
- def add_property(self, name, value):
586
+ def add_property(self, name: str, value: str):
584
587
  """Add a property *name* = *value* to the testsuite.
585
588
 
586
589
  See :class:`Property` and :class:`Properties`.
@@ -593,17 +596,17 @@ class TestSuite(Element):
593
596
  prop = Property(name, value)
594
597
  props.add_property(prop)
595
598
 
596
- def add_testcase(self, testcase):
599
+ def add_testcase(self, testcase: TestCase):
597
600
  """Add a testcase *testcase* to the testsuite."""
598
601
  self.append(testcase)
599
602
  self.update_statistics()
600
603
 
601
- def add_testcases(self, testcases):
604
+ def add_testcases(self, testcases: List[TestCase]):
602
605
  """Add testcases *testcases* to the testsuite."""
603
606
  self.extend(testcases)
604
607
  self.update_statistics()
605
608
 
606
- def _add_testcase_no_update_stats(self, testcase):
609
+ def _add_testcase_no_update_stats(self, testcase: TestCase):
607
610
  """Add *testcase* to the testsuite (without updating statistics).
608
611
 
609
612
  For internal use only to avoid quadratic behaviour in merge.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: junitparser
3
- Version: 3.1.1
3
+ Version: 3.1.2
4
4
  Summary: Manipulates JUnit/xUnit Result XML files
5
5
  Home-page: https://github.com/weiwei/junitparser
6
6
  Author: Weiwei Wang
@@ -28,12 +28,12 @@ existing Result XML files, or create new JUnit/xUnit result XMLs from scratch.
28
28
  Features
29
29
  --------
30
30
 
31
- * Parse or modify existing JUnit/xUnit xml files.
32
- * Parse or modify non-standard or customized JUnit/xUnit xml files, by monkey
31
+ * Parse or modify existing JUnit/xUnit XML files.
32
+ * Parse or modify non-standard or customized JUnit/xUnit XML files, by monkey
33
33
  patching existing element definitions.
34
34
  * Create JUnit/xUnit test results from scratch.
35
- * Merge test result xml files.
36
- * Specify xml parser. For example you can use lxml to speed things up.
35
+ * Merge test result XML files.
36
+ * Specify XML parser. For example you can use lxml to speed things up.
37
37
  * Invoke from command line, or `python -m junitparser`
38
38
  * Python 2 and 3 support (As of Nov 2020, 1/4 of the users are still on Python
39
39
  2, so there is no plan to drop Python 2 support)
@@ -41,7 +41,7 @@ Features
41
41
  Note on version 2
42
42
  -----------------
43
43
 
44
- Version 2 improved support for pytest result xml files by fixing a few issues,
44
+ Version 2 improved support for pytest result XML files by fixing a few issues,
45
45
  notably that there could be multiple <Failure> or <Error> entries. There is a
46
46
  breaking change that ``TestCase.result`` is now a list instead of a single item.
47
47
  If you are using this attribute, please update your code accordingly.
@@ -149,7 +149,7 @@ Schema Support
149
149
  ~~~~~~~~~~~~~~~
150
150
 
151
151
  By default junitparser supports the schema of windyroad_, which is a relatively
152
- simple schema.
152
+ simple schema.
153
153
 
154
154
  .. _windyroad: https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd
155
155
 
@@ -295,7 +295,7 @@ Command Line
295
295
  Test
296
296
  ----
297
297
 
298
- The tests are written with python `unittest`, to run them, use pytest::
298
+ The tests are written with python ``unittest``, to run them, use pytest::
299
299
 
300
300
  pytest test.py
301
301
 
File without changes
File without changes
File without changes
File without changes