The python source code files that contain unit tests have inconsistent names. Some have names like test_*.py (e.g. monkey/common/network/test_network_utils.py) while others have names like *_test.py (e.g. infection_monkey/exploit/tools/payload_parsing_test.py). To further complicate matters, some files, such as monkey_island/cc/resources/test/monkey_test.py, are not unit tests at all.
Solution
Both pytest and unittest use the naming convention test_*.py. Rename all of the files with names like *_test.py that contain unit tests so that they are consistent with pytest and unittest recommendation.
Where applicable, the class names should match the filenames. For example, the file containing class TestBootloader should be named test_bootloader.py
[x] All files containing unit tests conform to the naming convention test_*.py
[x] Class names match file names
[x] All pre-existing unit tests run and pass
[x] Refactoring/renaming does not introduce any bugs or break any functionality
Issue
The python source code files that contain unit tests have inconsistent names. Some have names like
test_*.py
(e.g.monkey/common/network/test_network_utils.py
) while others have names like*_test.py
(e.g.infection_monkey/exploit/tools/payload_parsing_test.py
). To further complicate matters, some files, such asmonkey_island/cc/resources/test/monkey_test.py
, are not unit tests at all.Solution
Both pytest and unittest use the naming convention
test_*.py
. Rename all of the files with names like*_test.py
that contain unit tests so that they are consistent with pytest and unittest recommendation.Where applicable, the class names should match the filenames. For example, the file containing
class TestBootloader
should be namedtest_bootloader.py
test_*.py
Time Remaing - 0.25d - @shreyamalviya