FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-98393: Update test_os for bytes-like types by vstinner · Pull Request #98487 · python/cpython · GitHub

/ cpython Public

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

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_os
Nov 2, 2022
Merged

gh-98393: Update test_os for bytes-like types#98487
vstinner merged 1 commit into
python:mainfrom
vstinner:test_os

Conversation

vstinner commented Oct 20, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member Author

cc @serhiy-storchaka

Comment thread Lib/test/test_os.py Outdated
if not isinstance(name, (str, bytes)):
with self.assertRaises(TypeError):
func(name, *func_args)
# don't test TypeError here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Then why these filenames are occurred here at first place? bytearray and memoryview should not be added in self.bytes_filenames.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I removed bytearray and memoryviews from self.bytes_filenames (and self.filenames).

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

vstinner commented Nov 2, 2022

Copy link
Copy Markdown
Member Author

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

Address Serhiy Storchaka's review.

vstinner commented Nov 2, 2022

Copy link
Copy Markdown
Member Author

"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.

vstinner merged commit f3007ac into python:main Nov 2, 2022
vstinner deleted the test_os branch November 2, 2022 19:46

vstinner commented Nov 2, 2022

Copy link
Copy Markdown
Member Author

Thanks for the review @serhiy-storchaka.

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

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL