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

Improve tests #70

Open
m-lundberg opened this issue Oct 4, 2022 · 2 comments · May be fixed by #77
Open

Improve tests #70

m-lundberg opened this issue Oct 4, 2022 · 2 comments · May be fixed by #77

Comments

@m-lundberg
Copy link
Owner

The test suite for this library could be improved. The biggest problem is that it's not completely deterministic, so sometimes tests can fail due to timing and pass if you just rerun it. It should be fixed so that you get the same result every time running a test. Possibly dt and/or time_fn() could help. Some care needs to be taken so that the tests still test what they intend to test though.

The tests also take a needlessly long time to run, mostly because of test_converge_system(). It would be nice if this could be sped up.

I'm sure one could think of more tests to add too.

@gonzalo-bulnes
Copy link
Contributor

Possibly dt and/or time_fn() could help.

I wrote https://github.com/gonzalo-bulnes/stime some time ago, mostly as an exercise... but, reading this issue left me thinking.

Is something like that what you had in mind when writing that time_fn() could help?

@gonzalo-bulnes
Copy link
Contributor

I took a look, I can help. I'll open a PR that addresses both:

  • making tests deterministic
  • making tests significantly faster

@gonzalo-bulnes gonzalo-bulnes linked a pull request Oct 2, 2023 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants