Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:branches:openSUSE:Factory:Rings:1-MinimalX
python-deprecation
python-deprecation-no-unittest2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-deprecation-no-unittest2.patch of Package python-deprecation
From e13e23068cb8d653a02a434a159e8b0b7226ffd6 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer <jonringer117@gmail.com> Date: Tue, 11 Jan 2022 14:23:03 -0800 Subject: [PATCH] Make unittest optional for python3.5+ --- docs-requirements.txt | 2 +- test-requirements.txt | 2 +- tests/test_deprecation.py | 7 ++++++- tox.ini | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test_deprecation.py b/tests/test_deprecation.py index 0fd29b3..14e9510 100644 --- a/tests/test_deprecation.py +++ b/tests/test_deprecation.py @@ -12,7 +12,12 @@ # As we unfortunately support Python 2.7, it lacks TestCase.subTest which # is in 3.4+ or in unittest2 -import unittest2 +try: + import unittest2 +except ImportError: + import unittest + unittest2 = unittest + import warnings import deprecation
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor