Update test.support from CPython 3.11.2#4537
Merged
youknowone merged 5 commits intoRustPython:mainfrom Feb 24, 2023
Merged
Conversation
youknowone
commented
Feb 21, 2023
Lib/test/test_support.py
Outdated
| import_helper.import_module, "foo") | ||
|
|
||
| # TODO: RUSTPYTHON | ||
| @unittest.expectedFailure |
Lib/test/test_support.py
Outdated
| support.check_syntax_error(self, "x=1") | ||
|
|
||
| # TODO: RUSTPYTHON | ||
| @unittest.expectedFailure |
5ad9566 to
3e50134
Compare
3e50134 to
121a86d
Compare
fanninpm
reviewed
Feb 23, 2023
Lib/test/test_support.py
Outdated
Comment on lines
702
to
706
| # 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) |
Contributor
There was a problem hiding this comment.
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)
fanninpm
reviewed
Feb 23, 2023
Comment on lines
+546
to
+553
| # 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 |
Contributor
There was a problem hiding this comment.
@itsankitkp This is probably what I was looking for in #4474.
fanninpm
reviewed
Feb 23, 2023
| if _buggy_ucrt is None: | ||
| if(sys.platform == 'win32' and | ||
| locale.getdefaultlocale()[1] == 'cp65001' and | ||
| locale.getencoding() == 'cp65001' and |
121a86d to
994afe3
Compare
994afe3 to
7de0564
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
blockers
localelib, tests and Addlocale.getencoding#4155non-blockers
wasiinstead ofunknown#4539PYTHONSAFEPATH#4541