dieterich-lab / rp-bp

Rp-Bp is a Bayesian approach to predict, at base-pair resolution, ribosome occupancy and translation.
MIT License
7 stars 5 forks source link

improve tests #114

Closed lkeegan closed 1 year ago

lkeegan commented 1 year ago
lkeegan commented 1 year ago

@eboileau I didn't find a nice solution for dynamic parametrization of tests in pytest, but this PR would at least output the filenames and the location within the file where they differ when the test fails

eboileau commented 1 year ago

I didn't find a nice solution either. But asserting lists of lines for a few large files (and e.g. for mtx files), don't you think it will take some time...? I don't know... But I'm happy to stick to that solution now, and I can always go back and improve later.

lkeegan commented 1 year ago

I agree it definitely won't scale well to very large files, but I just did a quick test with two 800mb text files and asserting the readlines lists were equal took about a second, so hopefully it's good enough to be usable until replaced with something better? By the I think you need to approve running the workflows for this PR (as this is my first PR to the repo) to see if running pytest on the CI works.