HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules

x·2021년 4월 6일
1
import file mismatch:
imported module 'test_a' has this __file__ attribute:
  /opt/atlassian/pipelines/agent/build/1/tests/.py
which is not the same as the test file we want to collect:
  /opt/atlassian/pipelines/agent/build/2/tests/.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules

파이프라인에서 테스트 코드 실행 시 디렉토리로 구분되어 있으나 테스트명이 같은 경우 문제가 생긴다.
이런 경우 테스트 파일과 같은 레벨에 __init__.py를 넣어주면 된다.

https://stackoverflow.com/questions/12582503/test-discovery-failure-when-tests-in-different-directories-are-called-the-same

0개의 댓글