[BUG][Python] Tests should be generated under the PythonSrcRoot
Created by: 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.