Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup fixtures for testdata that can be used for all test functions #195

Open
jjjermiah opened this issue Jan 22, 2025 · 2 comments
Open
Assignees

Comments

@jjjermiah
Copy link
Contributor

#193 should be merged before this
now that we have the test data set up and the functions to download it in src/imgtools/datasets , we want to add fixtures to conftest.py that pytest will automaticallly make available for every other test job.

one thing we dont want to do is let all test functions mess with the same downloaded data, so lets use pytest-testdir to setup the pytest fixtures and make them available. this plugin will copy the data to temporary directories and thats what will be passed to the functions

this will help to make sure tests are accurately doing what we expect

  1. if more than one test tries to autopipeline the same dataset with different parameters, we dont want it to assume things like 'imgtools.csv' already exists.
  2. prevents race conditions to different files i.e imgtools_edges.csv for different parameters, which is preventing us from doing parallel testing
@jjjermiah
Copy link
Contributor Author

@JoshuaSiraj once #193 gets merged, can you work on this?

@jjjermiah
Copy link
Contributor Author

@JoshuaSiraj #193 merged, let me know if you need help, theres a branch for this issue

git fetch origin
git checkout 195-setup-fixtures-for-testdata-that-can-be-used-for-all-test-functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants