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 failing VI test due to pytest change #7144

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

aerubanov
Copy link
Contributor

@aerubanov aerubanov commented Feb 7, 2024

Description

In pytest 7 missing warning were ignored if some exception was raised, but pytest 8 checking them and thats why test_fit_start[SVGD-mini] fails. I replaced pytest.warn() by manual check for warning raised.

Related Issue

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc--7144.org.readthedocs.build/en/7144/

@aerubanov aerubanov mentioned this pull request Feb 7, 2024
11 tasks
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4991b6a) 58.65% compared to head (9826bd1) 92.25%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #7144       +/-   ##
===========================================
+ Coverage   58.65%   92.25%   +33.59%     
===========================================
  Files         101      101               
  Lines       16961    16961               
===========================================
+ Hits         9949    15647     +5698     
+ Misses       7012     1314     -5698     

see 71 files with indirect coverage changes

@ferrine
Copy link
Member

ferrine commented Feb 7, 2024

Many thanks investigating that!

pytest.skip(str(e))

if expected_warning:
assert len(record) > 1
Copy link
Member

@ricardoV94 ricardoV94 Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it bigger than 1 and not just bigger than zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups, just my stupid mistake

@ricardoV94 ricardoV94 changed the title Fix failing vi test Fix failing VI test due to pytest change Feb 8, 2024
@ricardoV94 ricardoV94 added tests no releasenotes Skipped in automatic release notes generation dependencies Pull requests that update a dependency file bug labels Feb 8, 2024
@ricardoV94 ricardoV94 merged commit 8745974 into pymc-devs:main Feb 8, 2024
23 checks passed
@ricardoV94
Copy link
Member

Thanks a ton @aerubanov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file no releasenotes Skipped in automatic release notes generation tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants