चलाते समय स्थानीय स्तर पर परीक्षण चल रहा है, लेकिन डॉकर बनाने और कंटेनर के अंदर चलने के बाद मुझे त्रुटि मिल रही है।त्रुटि प्राप्त करना importMismatchError py.test
/usr/local/lib/python3.5/site-packages/_pytest/config.py:325: in _getconftestmodules
return self._path2confmods[path]
E KeyError: local('/apis/db/tests')
During handling of the above exception, another exception occurred:
/usr/local/lib/python3.5/site-packages/_pytest/config.py:356: in _importconftest
return self._conftestpath2mod[conftestpath]
E KeyError: local('/apis/db/tests/conftest.py')
During handling of the above exception, another exception occurred:
/usr/local/lib/python3.5/site-packages/_pytest/config.py:362: in _importconftest
mod = conftestpath.pyimport()
/usr/local/lib/python3.5/site-packages/py/_path/local.py:680: in pyimport
raise self.ImportMismatchError(modname, modfile, self)
_pytest.config.ConftestImportFailure: ImportMismatchError('conftest', '/projects/my_project/db/tests/conftest.py', local('/apis/db/tests/conftest.py'))
/apis - यह डॉकरफ़ाइल में वर्कडियर है।
आपको शायद पाइथन आयात पथ या सिम्लिंक या जो भी हो, के साथ कुछ समस्याएं हैं। '/ परियोजना/my_project' क्या है और' apis' क्या है? क्या वे निर्देशिका या सिम्लिंक हैं? वे एक-दूसरे से कैसे जुड़े हैं? – MarSoft
@MarSoft/परियोजनाएं होम निर्देशिका में हैं, और/apis डॉकर की होम निर्देशिका में है, बीटीडब्ल्यू मैंने इस मुद्दे को हल किया है। धन्यवाद! –