Skip to content

Added is_readable(), is_writable(), and is_executable() methods#136

Open
rendicahya wants to merge 4 commits intoassertpy:mainfrom
rendicahya:main
Open

Added is_readable(), is_writable(), and is_executable() methods#136
rendicahya wants to merge 4 commits intoassertpy:mainfrom
rendicahya:main

Conversation

@rendicahya
Copy link

Assert that a path is readable, writable, or executable. For example:

assert_that("config.json").is_file().is_readable()

@saturnboy
Copy link
Contributor

@rendicahya Thanks for the PR. Since, assertpy needs to work on Windows, I don't think you can use PosixPath, instead just Path should work? Also, you probably want to improve all the file-based assertions in file.py, especially the is_file() assertion to correctly handle str or Path. Lastly, please add some new tests to the PR...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants