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

Fix scripts test stability #4849

Merged
merged 5 commits into from
Feb 16, 2025
Merged

Conversation

kratman
Copy link
Contributor

@kratman kratman commented Feb 14, 2025

Description

I noticed that on my Mac nox -s scripts and pytest tests both failed with this error:

tests/test_scripts.py::TestExamples::test_example_scripts[multiprocess_jax_solver.py] - AttributeError: 'PosixPath' object has no attribute 'startswith'

The changes in this PR make it work locally for me.

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctests
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@kratman kratman self-assigned this Feb 14, 2025
@kratman
Copy link
Contributor Author

kratman commented Feb 14, 2025

For me PyCharm also showed inspection errors:

  • list_of_files() was marked as being static
  • list_of_files() was marked as missing an argument
  • runpy.run_path(files) was marked as having the wrong type for the function

@kratman kratman mentioned this pull request Feb 14, 2025
@kratman kratman requested a review from a team February 14, 2025 20:10
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.70%. Comparing base (e39d72e) to head (e6db2f5).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4849   +/-   ##
========================================
  Coverage    98.70%   98.70%           
========================================
  Files          303      304    +1     
  Lines        23353    23432   +79     
========================================
+ Hits         23050    23129   +79     
  Misses         303      303           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kratman kratman enabled auto-merge (squash) February 15, 2025 04:28
@kratman kratman merged commit 86b00ce into pybamm-team:develop Feb 16, 2025
26 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.

2 participants