Bitbucket pipeline cannot find the file in the test folder: FileNotFoundError: [Errno 2]

Viewed 920

I am getting the following error in the bitbucket pipeline:

E   FileNotFoundError: [Errno 2] File /opt/atlassian/pipelines/agent/build/tests/Test_input.csv does not exist: '/opt/atlassian/pipelines/agent/build/tests/Test_input.csv'

But the file exist: check the screen shot

It is working on my system but not in bitbucket, should I add the path to bitbucket-pipelines.yml? How?

Here is the bitbucket-pipelines.yml

image: python:3.7.3

pipelines:
  default:
    - step:
        script:
          - pip install -r requirements.txt
          - pip install swolfpy-inputdata
          - pytest 

and here is my pytest.ini

[pytest]
python_paths = swolfpy_inputdata
testpaths = tests
python_files = tests/test_*.py  tests/*_test.py
minversion = 5.4
addopts = --verbose --durations=10 --color=yes  --cov=swolfpy_inputdata
1 Answers

According to the screenshot, the file that does indeed exist is called Test_Input.csv (uppercase I). You're getting FileNotFoundError for Test_input.csv (lowercase i). Please make sure that your test expects the filename that is actually present.

Related