Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants