Skip to content

Stabilize test checking badge generation and skip windows incompatible tests #19

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

Merged
merged 2 commits into from
May 4, 2020

Conversation

kkapka
Copy link
Contributor

@kkapka kkapka commented May 1, 2020

Environment:

  • Windows 10 Pro
  • Python 3.8.3

Problem:

  • Several unit tests were failing after making the clean setup.
  • The first problem was, that the badge generated by the script had attributes in a different order than badge from the existing one. The comparison was done by comparing their strings
  • The second issue is that the method call urllib.parse.urlparse(url) in pybadges._embed_image parse the windows path with schema (eg for path C:\Users\kkapka\something, urlparse method identifies C as a schema which causes an error, that this schema is not supported)

Solution:

  • compare two badges as text with xmldiff library. That lib solves the problem with attributes order
  • skip windows incompatible tests

Results:

  • All tests should pass both on Linux and Windows

@brianquinlan brianquinlan merged commit 67096d9 into google:master May 4, 2020
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.

None yet

2 participants