how to make a test driven development environment automatically

You made it this far and have become the greatest programmer in the world. To follow The Do Not Repeat Yourself (DRY) Principle, I write a program with the commands to make a Python Test Driven Development environment automatically anytime I want on a

review

To review, here are steps I take to make the environment for every project

on a computer with MacOS, Linux or Windows with Windows Subsystem for Linux

  1. I give the project a name

  2. I make a directory for the project

  3. I change directory to the project

  4. I make a directory for the source code named ‘src’

  5. I make a Python file to hold the source code in the ‘src’ folder

  6. I make a directory for the tests

  7. I make the ‘tests’ folder a Python package

  8. I make a Python file to hold the tests in the ‘tests’ folder

  9. I add the first failing test to the test file

  10. I make a virtual environment

  11. I activate the virtual environment

  12. I upgrade the Python package manager

  13. I make a requirements file for the needed Python packages

  14. I install the packages listed in the requirements file

  15. I run the tests automatically

  16. I open the test file in the editor from the terminal

  17. I make the test pass

  18. then I start working on the project

on a Windows computer without Windows Subsystem for Linux

  1. I give the project a name

  2. I make a directory for the project

  3. I change directory to the project

  4. I make a directory for the source code named ‘src’

  5. I make a Python file to hold the source code in the ‘src’ folder

  6. I make a directory for the tests

  7. I make the ‘tests’ folder a Python package

  8. I make a Python file to hold the tests in the ‘tests’ folder

  9. I add the first failing test to the test file

  10. I make a virtual environment

  11. I activate the virtual environment

  12. I upgrade the Python package manager

  13. I make a requirements file for the needed Python packages

  14. I install the packages listed in the requirements file

  15. I run the tests automatically

  16. I open the test file in the editor from the terminal

  17. I make the test pass

  18. then I start working on the project

I want to give one command for the program, the only steps I want to do are

  • give the project a name

  • make the test pass and

  • work on the project (though I can now use Artificial Intelligence to help with all of them)

this way I only need to do 3 steps instead of 18

As a reminder here is what the structure looks like if the name of the project is PROJECT_NAME

PROJECT_NAME
├── requirements.txt
├── src
   └── PROJECT_NAME.py
└── tests
    └── test_PROJECT_NAME.py

what is covered?

These chapters show how I setup a project in `Python Test Driven Development environment`_ automatically on any computer (Linux, Windows, MacOS)

they cover the following

on Linux, MacOS and Windows with Window Subsystem for Linux computers

On Windows computers without Windows Subsystem for Linux


at the end of the chapter you will know how to automatically make a Python Test Driven Development project for MacOS, Linux, Windows Subsystem for Linux and Windows without Windows Subsystem for Linux


what is next?