ConaireD / TolimanWIP

WIP Toliman codes go here before being added to the main TOLIMAN github
Other
0 stars 0 forks source link

Use `pytest.fixture`. #33

Closed Jordan-Dennis closed 1 year ago

Jordan-Dennis commented 1 year ago

Hi all, I am repurposing this thread to discuss the general use of pytest.fixtures in the tests. I was thinking that an interesting idea might be to set the fixtures up so that they are jit compiled. This would help address the F in F.I.R.S.T (see #13) and could be really handy. I think that it is definitely worth it to speed up the process so we are not waiting for that apertures/bases to generate. Regards Jordan.

Jordan-Dennis commented 1 year ago

Perhaps I can create a fixture to generate a file that does not exist using some clever hashing (very unlikely filename). This would be useful in the places I need to make sure a file does not exist.

Jordan-Dennis commented 1 year ago

pytest.mark.usefixture can be used instead of the conventional syntax. This seems a little more explicit and I will try this out if I develop fixtures. I am likely to do this for issues #18 and #11.

Jordan-Dennis commented 1 year ago

This details how to pass arguments to fixtures (which are not necessarily cached). This will be very usefull in addressing the state of #1 since I have hit a dead end with the refactor there.

Jordan-Dennis commented 1 year ago

fixtures are executed first within there scope. I can use these to do the destruction and hopefully the taredown as well.

Jordan-Dennis commented 1 year ago

We have some very advanced fixture usage from my point of view.