Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a real path instead of a fake path to fix test error in IPCProvider #480

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

voith
Copy link
Collaborator

@voith voith commented Oct 7, 2018

What was wrong?

The test was using a fake path. Ever since pathlib was introduced in IPCProvider, fake paths no longer work. Here is a failing build.

How was it fixed?

Used a tempfile.gettempdir() to make sure that the path exists. Also had to use a Path('path').resolve to get the test passing on OSx. On OSX, /var is a symlink to /private/var.
tempfile.gettempdir() returns /var but Path('path').resolve returns /private/var

Cute Animal Picture

@voith voith requested a review from carver October 7, 2018 23:40
@voith
Copy link
Collaborator Author

voith commented Oct 8, 2018

I just got a little lazy and used a directory path instead of file path.
something like tmp_path = Path(gettempdir()).resolve() / 'jsonrpc.json'.
Did not do this as it would need to actually create a file, else the test would complain that path doesn't exist. Let me know if thats needed.

Copy link
Contributor

@carver carver left a comment

Choose a reason for hiding this comment

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

Yup, looks fine to me 👍

@voith voith merged commit 9054440 into ethereum:master Oct 8, 2018
@voith voith deleted the fix-ipc-path-tests branch October 8, 2018 16:25
@voith
Copy link
Collaborator Author

voith commented Oct 8, 2018

Thanks @carver

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