Refactor osmapi to be more pythonic#189
Conversation
Co-authored-by: metaodi <538415+metaodi@users.noreply.github.com>
|
@claude[agent] the build fails, can you check why and fix it? |
Co-authored-by: metaodi <538415+metaodi@users.noreply.github.com>
|
@claude[agent] now there is a |
Co-authored-by: metaodi <538415+metaodi@users.noreply.github.com>
Fixed in 5f66e91. Pinned black to version 24.8.0 for consistent formatting across Python 3.9-3.11, and simplified f-string formatting in capabilities.py and note.py. |
…m/metaodi/osmapi into claude/refactor-to-pythonic-style
|
@claude[agent] the tests fail, something doesn't work with the mocks, can you check and fix the issue in a new PR? |
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
This PR fixes test failures caused by mock objects being passed to XML parsing functions after the snake_case refactoring in PR #189. ProblemAfter refactoring test method names to snake_case, many tests failed with
|
|
@claude[agent] why do the tests fail during the build? It works locally on my machine. Am I missing something? |
The tests fail in CI because some fixture files weren't fully renamed to snake_case. The test methods are now When tests can't find their fixture files, they use a default mock response that isn't valid XML, causing |
Complete the snake_case refactoring by renaming the last 5 fixture files that were still using CamelCase. This fixes test failures in CI where tests couldn't find their fixture files and fell back to invalid mock XML responses. Files renamed: - test_Capabilities.xml → test_capabilities.xml - test_Changeset_create.xml → test_changeset_create.xml - test_Changeset_create_node.xml → test_changeset_create_node.xml - test_Changeset_download_containing_unicode.xml → test_changeset_download_containing_unicode.xml - test_Changeset_upload.xml → test_changeset_upload.xml All 147 tests now pass. Test coverage improved from 87% to 90%. Co-authored-by: metaodi <538415+metaodi@users.noreply.github.com>
No description provided.