File path
Enter the command D:\demo > python -m unittest unittest_1/testcase_1.Test result prompt ModuleNotFoundError: No module named ‘unittest_1/testcase_1’, see the figure for details
Solution: enter unittest_1 path, and then enter the command Python – M unittest testcase_1.Test
Enter command python -m testcase_1.Test result prompt error while finding module specification for ‘testcase_1.Test’ (ModuleNotFoundError: __path__ attribute not found on ‘testcase_1’ while trying to find ‘testcase_1.Test’)
Solution: the command statement is incorrect. The command to be executed is Python – M unittest module name.Class name
Similar Posts:
- Solve the error code: 1175 error of MySQL workbench
- How to Solve TypeError: object() takes no parameters
- [Solved] Error when calling different modules of Python functions: ModuleNotFoundError: No module named’python_base.test1′;’python_base’ is not a package
- Pytest executes the case.py file on the terminal error: Modulenotfounderror: no module named ‘API’
- [Solved] Python3 Error: ModuleNotFoundError: No module named ‘_bz2’
- AttributeError: module ‘requests’ has no attribute ‘get’ [How to Solve]
- The execution order of return statement in try except else finally in Python
- Error in mybatis mapping .XML File [How to Solve]
- modulenotfounderror: no module named ‘cv2’ [How to Solve]