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: Tests on Windows #291

Merged
merged 2 commits into from
Feb 12, 2023
Merged

Conversation

USSX-Hares
Copy link
Contributor

@USSX-Hares USSX-Hares commented Sep 26, 2022

Changed API:

  • HOCONConverter.__escape_string() / .escape_match() methods are now protected instead of private

Changed Tests:

  • Temporary files are closed before being passed to the library
    (and then carefully deleted)
  • Temporary file names are properly escaped
  • file:// URLs are properly escaped by using urllib.pathname2url()
  • When writing a file with a multiline string, now uses binary IO instead of text IO to prevent line breaks mess

Peter Zaitcev added 2 commits September 26, 2022 13:41
 * Temporary files are closed before being passed to the library
   (and then carefully deleted)
 * Temporary file names is properly escaped
 * `file://` URLs are properly escaped by using `urllib.pathname2url()`
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.8%) to 94.371% when pulling 978d089 on USSX-Hares:fix/tests-on-windows into be660de on chimpler:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.8%) to 94.371% when pulling 978d089 on USSX-Hares:fix/tests-on-windows into be660de on chimpler:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.8%) to 94.371% when pulling 978d089 on USSX-Hares:fix/tests-on-windows into be660de on chimpler:master.

@darthbear darthbear merged commit b3eb095 into chimpler:master Feb 12, 2023
@darthbear
Copy link
Member

Thank you USSX-Hares!

darthbear pushed a commit that referenced this pull request Feb 12, 2023
* HOCONConverter: Make `__escape_*` methods protected instead of private.

* Tests: Tests on Windows no longer fail:
 * Temporary files are closed before being passed to the library
   (and then carefully deleted)
 * Temporary file names is properly escaped
 * `file://` URLs are properly escaped by using `urllib.pathname2url()`

---------

Co-authored-by: Peter Zaitcev <[email protected]>
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.

3 participants