2011-09-10 11:59:22 +00:00
|
|
|
diff -up Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest Python-3.2.2/Lib/unittest/case.py
|
|
|
|
--- Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest 2011-09-03 12:16:44.000000000 -0400
|
|
|
|
+++ Python-3.2.2/Lib/unittest/case.py 2011-09-09 06:35:16.365568382 -0400
|
|
|
|
@@ -3,6 +3,7 @@
|
|
|
|
import sys
|
|
|
|
import functools
|
|
|
|
import difflib
|
|
|
|
+import os
|
Update to Python 3.4 alpha 4.
- Refreshed patches: 55 (systemtap), 102 (lib64), 111 (no static lib),
114 (statvfs flags), 132 (unittest rpmbuild hooks), 134 (fix COUNT_ALLOCS in
test_sys), 143 (tsc on ppc64), 146 (hashlib fips), 153 (test gdb noise),
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port), 186 (dont raise
from py_compile)
- Removed patches: 129 (test_subprocess nonreadable dir - no longer fails in
Koji), 142 (the mock issue that caused this is fixed)
- Added patch 187 (remove thread atfork) - will be in next version
- Refreshed script for checking pyc and pyo timestamps with new ignored files.
- The fips patch is disabled for now until upstream makes a final decision
what to do with sha3 implementation for 3.4.0.
2013-11-05 11:39:14 +00:00
|
|
|
import logging
|
2011-09-10 11:59:22 +00:00
|
|
|
import pprint
|
|
|
|
import re
|
2016-03-17 09:40:36 +00:00
|
|
|
@@ -101,5 +102,21 @@ def expectedFailure(func):
|
Update to Python 3.4 alpha 4.
- Refreshed patches: 55 (systemtap), 102 (lib64), 111 (no static lib),
114 (statvfs flags), 132 (unittest rpmbuild hooks), 134 (fix COUNT_ALLOCS in
test_sys), 143 (tsc on ppc64), 146 (hashlib fips), 153 (test gdb noise),
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port), 186 (dont raise
from py_compile)
- Removed patches: 129 (test_subprocess nonreadable dir - no longer fails in
Koji), 142 (the mock issue that caused this is fixed)
- Added patch 187 (remove thread atfork) - will be in next version
- Refreshed script for checking pyc and pyo timestamps with new ignored files.
- The fips patch is disabled for now until upstream makes a final decision
what to do with sha3 implementation for 3.4.0.
2013-11-05 11:39:14 +00:00
|
|
|
raise self.test_case.failureException(msg)
|
2011-09-10 11:59:22 +00:00
|
|
|
|
|
|
|
+# Non-standard/downstream-only hooks for handling issues with specific test
|
|
|
|
+# cases:
|
|
|
|
+
|
|
|
|
+def _skipInRpmBuild(reason):
|
|
|
|
+ """
|
|
|
|
+ Non-standard/downstream-only decorator for marking a specific unit test
|
|
|
|
+ to be skipped when run within the %check of an rpmbuild.
|
|
|
|
+
|
|
|
|
+ Specifically, this takes effect when WITHIN_PYTHON_RPM_BUILD is set within
|
|
|
|
+ the environment, and has no effect otherwise.
|
|
|
|
+ """
|
|
|
|
+ if 'WITHIN_PYTHON_RPM_BUILD' in os.environ:
|
|
|
|
+ return skip(reason)
|
|
|
|
+ else:
|
|
|
|
+ return _id
|
|
|
|
+
|
Update to Python 3.4 alpha 4.
- Refreshed patches: 55 (systemtap), 102 (lib64), 111 (no static lib),
114 (statvfs flags), 132 (unittest rpmbuild hooks), 134 (fix COUNT_ALLOCS in
test_sys), 143 (tsc on ppc64), 146 (hashlib fips), 153 (test gdb noise),
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port), 186 (dont raise
from py_compile)
- Removed patches: 129 (test_subprocess nonreadable dir - no longer fails in
Koji), 142 (the mock issue that caused this is fixed)
- Added patch 187 (remove thread atfork) - will be in next version
- Refreshed script for checking pyc and pyo timestamps with new ignored files.
- The fips patch is disabled for now until upstream makes a final decision
what to do with sha3 implementation for 3.4.0.
2013-11-05 11:39:14 +00:00
|
|
|
class _AssertRaisesBaseContext(_BaseTestCaseContext):
|
2011-09-10 11:59:22 +00:00
|
|
|
|
2015-09-16 06:36:17 +00:00
|
|
|
def __init__(self, expected, test_case, expected_regex=None):
|
2011-09-10 11:59:22 +00:00
|
|
|
diff -up Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest Python-3.2.2/Lib/unittest/__init__.py
|
|
|
|
--- Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest 2011-09-03 12:16:44.000000000 -0400
|
|
|
|
+++ Python-3.2.2/Lib/unittest/__init__.py 2011-09-09 06:35:16.366568382 -0400
|
|
|
|
@@ -57,7 +57,8 @@ __unittest = True
|
|
|
|
|
|
|
|
from .result import TestResult
|
|
|
|
from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf,
|
|
|
|
- skipUnless, expectedFailure)
|
|
|
|
+ skipUnless, expectedFailure,
|
2016-03-17 09:51:32 +00:00
|
|
|
+ _skipInRpmBuild)
|
2011-09-10 11:59:22 +00:00
|
|
|
from .suite import BaseTestSuite, TestSuite
|
|
|
|
from .loader import (TestLoader, defaultTestLoader, makeSuite, getTestCaseNames,
|
|
|
|
findTestCases)
|