Skip to content

[BUG][Python] Tests should be generated under the PythonSrcRoot #9673

@tray2100

Description

@tray2100

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The current behaviour is that tests are generated at the root directory even if pythonSrcRoot has been specified. At the very least the tests folder (and the files therein) should be generated under the pythonSrcRoot. This makes even more sense if you're also including pythonSrcRoot in the import namespace.

openapi-generator version

5.1.1

Suggest a fix

The fix here would be to modify the testPackage variable based on a flag if pythonSrcRoot has been specified to include the pythonSrcRoot value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions