OpenAPITools / OpenAPITools/openapi-generator

[python-flask] Move `test` directory out of code directory

Open
#14,729 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Server: Python
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

In my org we want the structure of Python packages to be consistent. I try to adjust the output of the python-flask generator.

After generating I end up with a directory structure like this:

/my_service
|_ controllers
|_ models
|_ ...
|_ test

I'd like to generate the test directory outside of my_service and call it tests:

/my_service
|_ controllers
|_ models
|_ ...
/tests

Is that possible?

openapi-generator version

6.0.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the python-flask generator entry point and its templates for the generated test directory. Compare the current layout with the requested /tests layout and check any generator tests covering output paths. Done means generated projects place the renamed tests directory outside the service directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
backend, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.