Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ERROR: file or directory not found: tests/*

I am new to use bitbucket, when I tried setting up the pipeline, the YAML file bitbucket-pipelines.yml gives an error saying ERROR: file or directory not found: tests/*

image: python:3.8
pipelines: default: - parallel: - step: name: Test caches: - pip script: - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - pip install pytest - pytest -v tests/* --junitxml=test-reports/report.xml - step: name: Lint code script: # Enforce style consistency across Python projects https://flake8.pycqa.org/en/latest/manpage.html - pip install flake8 - flake8 . --extend-exclude=dist,build --show-source --statistics

can anyone help me on this?

1 answer

0 votes

Hi @Test Account,

Which command gives you this error? I assume it's the following one?

pytest -v tests/* --junitxml=test-reports/report.xml

The error indicates that the tests folder does not exist in the repository. The pytest command expects to find files with tests in this directory.

If you have these files in a different directory in your repository, you'll need to replace tests/* in the command in your yml file with the path of the directory where the tests exist.

Please feel free to let me know how it goes and if you have any further questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

3,656 views 63 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you