Repository navigation
Disable python flask tests - #25519
Conversation
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonFlaskConnexionServerCodegenTest.java">
<violation number="1" location="modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonFlaskConnexionServerCodegenTest.java:168">
P2: This disables the only regression test that verifies model examples use the imported `Filter`/`Trace` classes; the test documents that `openapi_server.Filter()` raises `NameError`. Re-enable it and fix the generator output rather than masking the failure.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| } | ||
|
|
||
| @Test(description = "model examples in generated controller tests use the imported class name, not the package") | ||
| @Test(description = "model examples in generated controller tests use the imported class name, not the package", enabled = false) |
There was a problem hiding this comment.
P2: This disables the only regression test that verifies model examples use the imported Filter/Trace classes; the test documents that openapi_server.Filter() raises NameError. Re-enable it and fix the generator output rather than masking the failure.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonFlaskConnexionServerCodegenTest.java, line 168:
<comment>This disables the only regression test that verifies model examples use the imported `Filter`/`Trace` classes; the test documents that `openapi_server.Filter()` raises `NameError`. Re-enable it and fix the generator output rather than masking the failure.</comment>
<file context>
@@ -165,7 +165,7 @@ public void testDefaultController() throws IOException {
}
- @Test(description = "model examples in generated controller tests use the imported class name, not the package")
+ @Test(description = "model examples in generated controller tests use the imported class name, not the package", enabled = false)
public void testControllerTestModelExampleUsesImportedName() throws IOException {
final DefaultCodegen codegen = new PythonFlaskConnexionServerCodegen();
</file context>
| @Test(description = "model examples in generated controller tests use the imported class name, not the package", enabled = false) | |
| @Test(description = "model examples in generated controller tests use the imported class name, not the package") |
|
Thanks for disabling it, and sorry for the breakage on master. #25426 and #25485 were merged within a day of each other and the controller-test query rendering changed in between, so the assertion in this test went stale. I'll check what master generates now, fix the assertion, and send a PR that re-enables it. |
|
Opened #25552 to fix the stale assertion and re-enable the test. |
…lerTestModelExampleUsesImportedName (#25552) The test was disabled in #25519 because its query_string assertion expected the pre-#25485 rendering ('filter', Filter()). Object-typed query/header parameters are now sent in their OpenAPI wire style (form/explode pairs for the query object, a simple-style value for the header), and the body parameter is renamed to filter_ per #25450. Update the expectations to the current generated output while keeping the test's purpose: model examples still use the imported class name ([Filter()], {'key': Filter()}, filter_ = Filter()), never the package-qualified openapi_server.Filter()/openapi_server.Trace(). Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
disable the test due to the following errors:
@khayashi4337, when you've time, can you please revise the test and re-enable it?
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
Summary by cubic
Disables the
testControllerTestModelExampleUsesImportedNametest in the Python Flask generator so it stops failing in CI.Written for commit 6f55df9. Summary will update on new commits.