How to Solve NameError: name 'tests' is not defined -- .

Solution: Import the 'tests' module

To Solve the error, add the following line to the top of your code.

from . import tests

 

For more information:
Python . tests