Thanks to visit codestin.com
Credit goes to github.com

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

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

Merged
brianquinlan merged 2 commits into
google:masterfrom
kkapka:fix-failing-test
May 4, 2020
Merged

Stabilize test checking badge generation and skip windows incompatible tests#19
brianquinlan merged 2 commits into
google:masterfrom
kkapka:fix-failing-test

Conversation

@kkapka

@kkapka kkapka commented May 1, 2020

Copy link
Copy Markdown
Contributor

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