Python Unit Test Error: AttributeError has no attribute test

I got AttributeError: has no attribute ‘test’ when I run python unit test.

The cause of the error is due to file naming that has ‘filename.test.py’. So I change into test_filename.py then it works!