summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2022-06-03 15:12:19 -0400
committerJeff Forcier <jeff@bitprophet.org>2022-06-03 15:12:19 -0400
commit7c54625f8fc21d8381ecb4a1af74f2db5da96da1 (patch)
treead08f4f0bcd9f4ce04a1c2b29588ec5ff734fe8f
parent47cfed55575c21ac558e6d00a4ab1814406be651 (diff)
downloadparamiko-7c54625f8fc21d8381ecb4a1af74f2db5da96da1.tar.gz
Fix broken unittesty skipTest in locale decorator
-rw-r--r--tests/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/__init__.py b/tests/__init__.py
index 2a9cb4b9..f43975d2 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -49,9 +49,8 @@ def _decorate_with_locale(category, try_locales, test_method):
return test_method(testself, *args, **kwargs)
finally:
locale.setlocale(category, original)
- skipTest = getattr(testself, "skipTest", None)
- if skipTest is not None:
- skipTest("No usable locales installed")
+ # No locales could be used? Just skip the decorated test :(
+ skip("No usable locales installed")
functools.update_wrapper(_test_under_locale, test_method)
return _test_under_locale