From 30ffafb3e52f9af1bc98f5785793615f5e7aeeed Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 19 Jan 2023 12:56:08 -0800 Subject: [PATCH] Clean up some cruft Change-Id: I262b6c8fbe01bd4e08e9c685fc61b429ccc2d7e3 --- setup.cfg | 13 ------------- test/__init__.py | 21 +-------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/setup.cfg b/setup.cfg index bf4b14fefc..650a5e04cb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -145,18 +145,5 @@ swift.diskfile = swift.object_audit_watcher = dark_data = swift.obj.watchers.dark_data:DarkDataWatcher -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 - [bdist_wheel] universal = 1 - -[nosetests] -exe = 1 -verbosity = 2 -detailed-errors = 1 -cover-package = swift -cover-html = true -cover-erase = true diff --git a/test/__init__.py b/test/__init__.py index 58b8c3f72c..2974b465f9 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# See http://code.google.com/p/python-nose/issues/detail?id=373 -# The code below enables nosetests to work with i18n _() blocks from __future__ import print_function import sys from contextlib import contextmanager @@ -22,20 +20,7 @@ from contextlib import contextmanager import os from six import reraise -try: - from unittest.util import safe_repr -except ImportError: - # Probably py26 - _MAX_LENGTH = 80 - - def safe_repr(obj, short=False): - try: - result = repr(obj) - except Exception: - result = object.__repr__(obj) - if not short or len(result) < _MAX_LENGTH: - return result - return result[:_MAX_LENGTH] + ' [truncated]...' +from unittest.util import safe_repr import warnings warnings.filterwarnings('ignore', module='cryptography|OpenSSL', message=( @@ -59,10 +44,6 @@ if sys.version_info < (3, 2): from eventlet.green import socket -# make unittests pass on all locale -import swift -setattr(swift, 'gettext_', lambda x: x) - from swift.common.utils import readconf