python-intermediate-development icon indicating copy to clipboard operation
python-intermediate-development copied to clipboard

Remove imports from within test functions

Open bielsnohr opened this issue 2 years ago • 0 comments
trafficstars

PEP8 specifies that imports should be put at the top of a Python file: https://peps.python.org/pep-0008/#imports

Therefore, linters will complain for the tests explained in Episode 2, Section 2, "Scaling Up Unit Testing".

We should group all imports at the top of the test files unless we want this to be a teachable linting moment.

bielsnohr avatar Nov 10 '23 15:11 bielsnohr