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

Make test_shutil test_disk_usage not depend on the cwd filesystem.#2597

Merged
gpshead merged 3 commits into
python:masterpython/cpython:masterfrom
gpshead:shutil_disk_usage_leniencygpshead/cpython:shutil_disk_usage_leniencyCopy head branch name to clipboard
Jul 7, 2017
Merged

Make test_shutil test_disk_usage not depend on the cwd filesystem.#2597
gpshead merged 3 commits into
python:masterpython/cpython:masterfrom
gpshead:shutil_disk_usage_leniencygpshead/cpython:shutil_disk_usage_leniencyCopy head branch name to clipboard

Conversation

@gpshead

@gpshead gpshead commented Jul 6, 2017

Copy link
Copy Markdown
Member

Don't assume so much about the test execution environment's getcwd()
filesystem space usage reports.

Don't assume so much about the test execution environment's getcwd()
filesystem space usage reports.
@mention-bot

Copy link
Copy Markdown

@gpshead, thanks for your PR! By analyzing the history of the files in this pull request, we identified @serhiy-storchaka, @pitrou and @hynek to be potential reviewers.

@gpshead gpshead added the trivial label Jul 6, 2017
@serhiy-storchaka

Copy link
Copy Markdown
Member

Maybe use __file__ or sys.executable instead of os.getcwd()?

@gpshead gpshead changed the title Make test_shutil test_disk_usage's more lenient. Make test_shutil test_disk_usage more lenient. Jul 6, 2017
@gpshead

gpshead commented Jul 6, 2017

Copy link
Copy Markdown
Member Author

sys.executable = None in the environment where I ran into the problem (an embedded CPython interpreter running the test suite. __file__ is a potential alternative and appears to work. I'll just use that.

Leaving the assertions as they were originally.
@serhiy-storchaka

Copy link
Copy Markdown
Member

This doesn't work on Windows. Maybe use os.path.dirname(__file__)?

@gpshead gpshead self-assigned this Jul 7, 2017
@gpshead gpshead changed the title Make test_shutil test_disk_usage more lenient. Make test_shutil test_disk_usage not depend on the cwd filesystem. Jul 7, 2017
@gpshead gpshead merged commit 529746c into python:master Jul 7, 2017
gpshead added a commit to gpshead/cpython that referenced this pull request Jul 23, 2017
…onGH-2597)

Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
(cherry picked from commit 529746c)
gpshead added a commit that referenced this pull request Jul 23, 2017
) (#2820)

Make test_shutil test_disk_usage not depend on the current working directory's filesystem.
(cherry picked from commit 529746c)
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.

4 participants

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