ConaireD / TolimanWIP

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

The D.R.Y Principle. #41

Closed Jordan-Dennis closed 1 year ago

Jordan-Dennis commented 1 year ago

Hi all, This issue is to track instances that violate the Don't Repeat Yourself principle. Regards Jordan.

Jordan-Dennis commented 1 year ago

So there is a fair amount of bad practice that is occuring in tests/build/conftest.py. The main problem is indexing the phoenix_dirs correctly. They are created in multiple places so that they can be accessed by name, but I think I should use indexing constants here. This is not ideal but creating a custom iterator seems over the top and messy. I did experiment in this direction for a time.

Jordan-Dennis commented 1 year ago

There are other issues in the tests as well. In a few places there are magic numbers for the number of lines. I should work out how to share this number across the files. Given that it is pytest it likely requires a fixture.