python - Should I include the function that I am testing inside the unittest file, or should I just import it in the unittest file? -
python - Should I include the function that I am testing inside the unittest file, or should I just import it in the unittest file? -
i want inquire if should include function testing within unittest file (such have 1 file, unittest.py), or should import in unittest file (i have 2 files, unittest.py , function.py). seeing both methods when read in web, find first testing described redundant.
two separate files of course. thought unit test should non-intrusive , should sit down in own file, set under test directory and/or named test_*. have never seen people set in same file unless trivial demo.
python unit-testing function
Comments
Post a Comment