-
Notifications
You must be signed in to change notification settings - Fork 243
pytest-html is trying to encode my data inappropriately #27
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
Comments
@birdsarah could you paste more of your stack trace? I'm most interested in what content is, and where it's being provided. I assume this is one of the debug items from pytest-selenium but it's not clear which one. Note that pytest-selenium doesn't officially support Python 3.x, and it's possible it could be fixed there. That said, we probably want to support |
I was able to replicate this, and have addressed it in #28. I am still interested in where this bytes object is being created though, if you could provide more information. |
My guess is that this is caused by pytest-selenium encoding here and here. This is necessary for Python 2.x but perhaps not for 3.x? @The-Compiler do you think this should be fixed in pytest-selenium to just pass the unicode object instead of encoding it first? |
As per the "unicode sandwich" concept (decode/encode at the borders, deal with unicode everywhere else), I think that'd make sense, yeah. |
Closing as the content should be encoded properly before sending it to pytest-html. I'll be fixing this in pytest-selenium. |
* fix main.js conflicts * fix js test * fix resource (main.js) test * revert change to report extra * filters style * css and dom brush up * Buildable app * always store data in html * Always store data blob in file * json dump test data * read data from dom element * manually initialize state * minimalistic dataset * simplify included files * Handle report extras * Handle python report hooks * imgviewer * present name in image viewer and open img on click * setup linter for project * conform to styles * show video in imageviewer (#14) * show video in imageviewer * Chore: Pluralize extra (#15) * Add extras.HTML * Move outcome handling to backend (#18) * Move outcome handling to backend * Pass in text version of longrepr if present * make collapse/expand all functional (#20) * make collapse/expand all functional * only create links for text, url and json (#22) * make filter search case insensitive (#21) * make filter search case insensitive * use sessionStorage to prevent preferences to be reapplied on new reports * avoid multiple event bindings + fix filter bug * Collapse individual row Co-authored-by: Jim Brännlund <[email protected]> * add no log output captured string * Query params (#25) * Add query params * adjust tests (#26) * Duration format (#27) * adjust tests * build format handler * remove dependency --------- Co-authored-by: Jim Brännlund <[email protected]> * Beyondevil/cleanup (#28) * chore: Cleanup branch before merge * chore: Fix duration and CI * Fix pre-commit issues --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Viktor Gustafsson <[email protected]>
I'm using:
I get the following error on a test fail:
When in pdb, just running
b64encode(content)
works great - maybe PY3 check isn't quite right? Could we check what content is instead?The text was updated successfully, but these errors were encountered: