-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add Unit Testing for development #56
Comments
That sound like a good ideal. I think the naming "test_.jl" sounds great. I also agree, that we can test a lot against Cantera. |
Hi @TJP-Karpowski , I agree with you that we should make the top level of src being clean. Indeed, putting them into either ./test/ or ./src/test is a good idea. As for the current test files, which are put at the level of src, the reason is that I haven't figured out a good pipeline for debugging code during the development phase. As you probably know, if I import Arrhenius.jl via Arrhenius.jl/src/_transport_test.jl Lines 5 to 43 in 3f77007
Noting that, I have to call Arrhenius.R to access the member of the Arrhenius module. This is different from the standard test file, like Lines 1 to 38 in 3f77007
|
I had the same problem with the Julia restart, luckily we are not the first to have that issue. You can use the revise package: https://timholy.github.io/Revise.jl/stable/ . |
As the package becomes more and more complex, it is important to adopt unit testing. We can following the example of RMS.jl at https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl/blob/ac2a3bd88504b86d5bc60dedc09533839a9c9cbb/src/Calculators/TestThermo.jl#L1-L60.
Some thoughts:
@test Cps ≈ Cpexplist rtol=1e-3
where 1e-3 is a good default value for tolerance.The text was updated successfully, but these errors were encountered: