separate and equal

So far all functions I have written have been in the same file as the tests, some are even in the same function as the assertions of the tests.

In earlier tests I found it better to keep functions outside of functions so that anything could call them from outside.

I can also place them in another module then use the import statement to bring in the module and test the function. This helps me keep tests and solutions separate.


what is next?

You now know:


Would you like to test separating tests from solutions in the other projects?

would you like to separate the tests from the solutions in the functions project?


rate pumping python

If this has been a 7 star experience for you, please CLICK HERE to leave a 5 star review of pumping python. It helps other people get into the book too.