Test failure on Windows/Python 3.13 and Multiple debug print statements in test suite #9807
Unanswered
Shrikantgiri25
asked this question in
Potential Issue
Replies: 1 comment
-
|
Hi DRF maintainers , I have submitted a Pull Request addressing the above issues:
PR link: #9808 Looking forward to your feedback! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi DRF maintainers!
I've encountered a couple of issues while running the test suite on Windows 11 with Python 3.13 that may need to be addressed.
Issue 1: TestRegularFieldMappings.test_regular_fields Fails on Windows/Python 3.13
What's Happening
The test
tests/test_model_serializer.py::TestRegularFieldMappings::test_regular_fieldsfails with:The regex pattern doesn't match the serializer's
repr()output.Environment
Root Cause
After debugging, I identified three platform-specific issues:
Windows file path format
tempfile.gettempdir()returnsC:\Users\USERNAME\AppData\Local\Tempwith backslashesPlatform-specific object representations
<tests.test_model_serializer.CustomField: custom_field>varyPython 3.13 repr() changes
IntegerField(max_value=...)include additional detailsProposed Solution
This maintains validation integrity while accommodating platform differences.
Issue 2: Debug Print Statements in test_openapi.py
What's Happening
The file
tests/schemas/test_openapi.pycontains multipleprint()statements that appear to be leftover debugging code.Impact
Proposed Solution
Remove all
print()statements from the file for cleaner test output.Questions for Maintainers
Windows support: Is running the test suite on Windows a priority for DRF? Should these tests work cross-platform?
Approach validation: Does making the regex more flexible (using
.*for dynamic fields) align with the test's validation intent?PR structure: Would you prefer:
Impact If Fixed
My Testing
I've already:
I'm ready to submit a PR once I get feedback on the approach!
Additional Context
Thanks for maintaining such an excellent project!
Looking forward to your guidance on how to proceed.
Screenshots
Beta Was this translation helpful? Give feedback.
All reactions