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

Added tests for CatalogTable.as_list_of_dicts (#1319) #1331

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

daud99
Copy link
Contributor

@daud99 daud99 commented Oct 17, 2024

  • Implemented test case with empty and standard input.

Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed

  • Have you followed the guidelines in our Contribution Guide
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Related to #1319

@daud99
Copy link
Contributor Author

daud99 commented Oct 17, 2024

@DhanshreeA

Let me know if I over did it. I have change input structure and made the needed changes so that nothing gets break.

Looking forward to your feedback.

@daud99
Copy link
Contributor Author

daud99 commented Oct 17, 2024

@DhanshreeA

For some reason, when I run the test cases on my local setup these two test cases gets fail.I'm sure why I haven't changed anything in the code which effect this part of the code. Can you see why is this?

================================================================================================== ERRORS ==================================================================================================
________________________________________________________________________________ ERROR at setup of test_benchmark_original _________________________________________________________________________________
file /Users/daudahmed/Outreachy/ERSILIA/ersilia/test/test_url_search.py, line 77
  def test_benchmark_original(actual_url, benchmark, original_finder):
E       fixture 'benchmark' not found
>       available fixtures: actual_url, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, optimized_finder, original_finder, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daudahmed/Outreachy/ERSILIA/ersilia/test/test_url_search.py:77
________________________________________________________________________________ ERROR at setup of test_benchmark_optimized ________________________________________________________________________________
file /Users/daudahmed/Outreachy/ERSILIA/ersilia/test/test_url_search.py, line 82
  def test_benchmark_optimized(actual_url, benchmark, optimized_finder):
E       fixture 'benchmark' not found
>       available fixtures: actual_url, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, optimized_finder, original_finder, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

@adebisi4145
Copy link
Contributor

adebisi4145 commented Oct 17, 2024

@DhanshreeA

For some reason, when I run the test cases on my local setup these two test cases gets fail.I'm sure why I haven't changed anything in the code which effect this part of the code. Can you see why is this?

Welldone @daud99 , try installing the pytest-benchmark plugin by running pip install pytest-benchmark

@DhanshreeA
Copy link
Member

@DhanshreeA

For some reason, when I run the test cases on my local setup these two test cases gets fail.I'm sure why I haven't changed anything in the code which effect this part of the code. Can you see why is this?

================================================================================================== ERRORS ==================================================================================================
________________________________________________________________________________ ERROR at setup of test_benchmark_original _________________________________________________________________________________
file /Users/daudahmed/Outreachy/ERSILIA/ersilia/test/test_url_search.py, line 77
  def test_benchmark_original(actual_url, benchmark, original_finder):
E       fixture 'benchmark' not found
>       available fixtures: actual_url, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, optimized_finder, original_finder, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daudahmed/Outreachy/ERSILIA/ersilia/test/test_url_search.py:77
________________________________________________________________________________ ERROR at setup of test_benchmark_optimized ________________________________________________________________________________
file /Users/daudahmed/Outreachy/ERSILIA/ersilia/test/test_url_search.py, line 82
  def test_benchmark_optimized(actual_url, benchmark, optimized_finder):
E       fixture 'benchmark' not found
>       available fixtures: actual_url, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, optimized_finder, original_finder, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

@daud99 try installing ersilia with the test extra again. This has been updated as a requirement in the pyproject.toml.

@DhanshreeA
Copy link
Member

@daud99 I don't understand why we rename test/inputs to tests/test_inputs? It is fine to leave it as it was. You can simply add your fixture file in that same test/inputs directory.

* Implemented test case with empty and standard input.
@daud99
Copy link
Contributor Author

daud99 commented Oct 23, 2024

@adebisi4145 Thankyou

@DhanshreeA you're right. I just make it as suggested. Can you check it now!

And I also made sure there is no conflict.

Regards

@DhanshreeA DhanshreeA merged commit a12a9d2 into ersilia-os:master Nov 18, 2024
18 checks passed
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 this pull request may close these issues.

3 participants