current position:Home>python error E ModuleNotFoundError: No module named 'x'

python error E ModuleNotFoundError: No module named 'x'

2022-09-23 07:23:15CSDN Q&A

An error is reported after importing the framework package pytest

conftest.py

import loggingimport sysfrom os.path import dirname, realpath, joinimport pytestlogger = logging.getLogger(__name__)sys.path.append(join(dirname(dirname(realpath(__file__))), 'src'))from matf.settings import *

img

img

Can run normally without error

copyright notice
author[CSDN Q&A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/266/202209161508513472.html

Random recommended