-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update test.support from CPython 3.11.2 #4537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Lib/test/test_support.py
Outdated
@@ -57,6 +57,8 @@ def test_import_module(self): | |||
self.assertRaises(unittest.SkipTest, | |||
import_helper.import_module, "foo") | |||
|
|||
# TODO: RUSTPYTHON | |||
@unittest.expectedFailure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken due to #4540
Lib/test/test_support.py
Outdated
@@ -320,6 +325,8 @@ def test_check_syntax_error(self): | |||
with self.assertRaises(AssertionError): | |||
support.check_syntax_error(self, "x=1") | |||
|
|||
# TODO: RUSTPYTHON | |||
@unittest.expectedFailure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken due to #4540
5ad9566
to
3e50134
Compare
3e50134
to
121a86d
Compare
Lib/test/test_support.py
Outdated
# TODO: RUSTPYTHON | ||
@unittest.expectedFailure | ||
def test_has_strftime_extensions(self): | ||
if support.is_emscripten or sys.platform == "win32": | ||
self.assertFalse(support.has_strftime_extensions) | ||
else: | ||
self.assertTrue(support.has_strftime_extensions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support.has_strftime_extensions
will always be False
when sys.platform == "win32"
.
I suggest using the os-dependent version:
def test_whatever(self):
...
# TODO: RUSTPYTHON
if sys.platform != "win32":
# TODO: RUSTPYTHON
test_whatever = unittest.expectedFailure(test_whatever)
# Does strftime() support glibc extension like '%4Y'? | ||
has_strftime_extensions = False | ||
if sys.platform != "win32": | ||
# bpo-47037: Windows debug builds crash with "Debug Assertion Failed" | ||
try: | ||
has_strftime_extensions = time.strftime("%4Y") != "%4Y" | ||
except ValueError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itsankitkp This is probably what I was looking for in #4474.
@@ -1364,7 +1456,7 @@ def skip_if_buggy_ucrt_strfptime(test): | |||
global _buggy_ucrt | |||
if _buggy_ucrt is None: | |||
if(sys.platform == 'win32' and | |||
locale.getdefaultlocale()[1] == 'cp65001' and | |||
locale.getencoding() == 'cp65001' and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is blocked on #4155.
121a86d
to
994afe3
Compare
994afe3
to
7de0564
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
blockers
locale
lib, tests and Addlocale.getencoding
#4155non-blockers
wasi
instead ofunknown
#4539PYTHONSAFEPATH
#4541