Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-98393: Update test_os for bytes-like types#98487

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:test_os
Nov 2, 2022
Merged

gh-98393: Update test_os for bytes-like types#98487

vstinner merged 1 commit intopython:mainfromvstinner:test_os
Nov 2, 2022

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedOct 20, 2022
edited by bedevere-bot
Loading

@vstinner
Copy link
MemberAuthor

cc@serhiy-storchaka

@@ -3861,17 +3861,17 @@ def test_oserror_filename(self):
for filenames, func, *func_args in funcs:
for name in filenames:
if not isinstance(name, (str, bytes)):
with self.assertRaises(TypeError):
func(name, *func_args)
# don't test TypeError here
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Other types are already well tested in other test methods of test_os.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Then why these filenames are occurred here at first place?bytearray andmemoryview should not be added inself.bytes_filenames.

BTW, does checking conditionsys.platform == "win32" above still have sense?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I removed bytearray and memoryviews fromself.bytes_filenames (andself.filenames).

I removed the code specific to Windows: let's see how CIs like my updated change :-)

@vstinner
Copy link
MemberAuthor

@serhiy-storchaka: Would you mind to review the updated PR?

Address Serhiy Storchaka's review.
@vstinner
Copy link
MemberAuthor

"Tests / Check if generated files are up to date (pull_request)" failed for an unrelated reason:

python3.8 ./Tools/build/update_file.py ./Include/internal/pycore_ast.h ./Include/internal/pycore_ast.h.new  File "./Tools/build/generate_opcode_h.py", line 111    with (open(outfile, 'w') as fobj, open(internaloutfile, 'w') as iobj):                             ^SyntaxError: invalid syntax

I rebased my PR to see if it helps.

@vstinnervstinner merged commitf3007ac intopython:mainNov 2, 2022
@vstinnervstinner deleted the test_os branchNovember 2, 2022 19:46
@vstinner
Copy link
MemberAuthor

Thanks for the review@serhiy-storchaka.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@serhiy-storchaka@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp