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

Appearance settings

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

Open
rendicahya wants to merge 4 commits intoassertpy:mainassertpy/assertpy:mainfrom
rendicahya:mainrendicahya/assertpy:mainCopy head branch name to clipboard
Open

Added is_readable(), is_writable(), and is_executable() methods#136
rendicahya wants to merge 4 commits intoassertpy:mainassertpy/assertpy:mainfrom
rendicahya:mainrendicahya/assertpy:mainCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.