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

Benchmarking not working using pytest #191

Closed
roussel-ryan opened this issue Jan 31, 2024 · 7 comments
Closed

Benchmarking not working using pytest #191

roussel-ryan opened this issue Jan 31, 2024 · 7 comments

Comments

@roussel-ryan
Copy link
Collaborator

Using running pytest on Xopt/tests fails due to the benchmarking code giving the error below:

============================= test session starts =============================
collecting ... collected 207 items / 1 error

!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 9.92s =========================

tests/benchmarks/test_mo.py:None (tests/benchmarks/test_mo.py)
'benchmark' not found in `markers` configuration option
@roussel-ryan
Copy link
Collaborator Author

@nikitakuklev

@nikitakuklev
Copy link
Contributor

Interesting...maybe something to do with missing pytest-benchmark (it had to be added to specs)? I'll poke around

@roussel-ryan
Copy link
Collaborator Author

roussel-ryan commented Jan 31, 2024

@nikitakuklev do you think you'll be able to fix this today? If not I think I will remove the benchmarking files for now and we can add it back in later. We are trying to do a release

@nikitakuklev
Copy link
Contributor

In what environment does this fail? Can you verify it was updated with the new pytest-benchmark dependency?

On my windows machine runs fine, even when combining tests and benchmarks with a simple 'pytest tests'.

@roussel-ryan
Copy link
Collaborator Author

roussel-ryan commented Jan 31, 2024

Ok it works with the additional pytest-benchmark dependency, can we move it out of the tests dir at least? Running tests is supposed to be a quick process. I can do the PR if you want

@nikitakuklev
Copy link
Contributor

The run_tests script excludes benchmarks with '--ignore=tests/benchmarks', but yes we can move it out. Please go ahead with PR.

@roussel-ryan
Copy link
Collaborator Author

Done #192

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

No branches or pull requests

2 participants