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

Fix for including a screenshot bug on Windows (#124) #136

Merged
merged 3 commits into from
Jan 4, 2018

Conversation

pinkie1378
Copy link
Contributor

No description provided.

@nicoddemus
Copy link
Member

LGTM, the failure seems unrelated though.

@pinkie1378
Copy link
Contributor Author

The Node.js tests didn't run because of a problem during PhantomJS installation. This is unrelated to the proposed change. Please advise.

@nicoddemus
Copy link
Member

@pinkie1378 I don't there's anything to be done in this PR, let's wait for @davehunt's input (he will be back next week it seems).

# On Windows, os.path.isfile throws this exception when
# passed a b64 encoded image.
is_file = False
if is_file:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm okay with this patch, but the is_file variable name is misleading. The variable determines if the content is a URI or a path, and not specifically if it's a file. Perhaps we could use a better variable name, or change the logic to determine if the content is a base64 encoded string only falling back to creating a link when it's not.

@davehunt
Copy link
Collaborator

The Node.js tests didn't run because of a problem during PhantomJS installation. This is unrelated to the proposed change. Please advise.

If anyone has time to investigate that issue it would be appreciated. I had hoped to be home by now but my travel has been disrupted so I may not get time to look for a few days at best. I wouldn't hold up this patch though, if the failure is clearly unrelated.

@davehunt
Copy link
Collaborator

davehunt commented Jan 2, 2018

I've fixed the Travis CI failure in 764ef3c so once the requests changes have been made I'm happy to merge and release a new version. Thanks @pinkie1378 and @nicoddemus for your contributions.

@davehunt davehunt merged commit c61dc5b into pytest-dev:master Jan 4, 2018
@davehunt
Copy link
Collaborator

davehunt commented Jan 4, 2018

pytest-html 1.16.1 has been released with this fix.

@ssbarnea ssbarnea added the bug This issue/PR relates to a bug. label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants