TEST: Add constraint parsing tests for quadratic_form_test#690
Open
aeshef wants to merge 3 commits intobashtage:mainfrom
Open
TEST: Add constraint parsing tests for quadratic_form_test#690aeshef wants to merge 3 commits intobashtage:mainfrom
aeshef wants to merge 3 commits intobashtage:mainfrom
Conversation
- Strip LHS in _parse_single for stable dict keys - Raise ValueError when formula= is used without a Series params - Remove redundant assert in InvalidTestStatistic.__str__
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #690 +/- ##
==========================================
+ Coverage 99.52% 99.54% +0.02%
==========================================
Files 100 101 +1
Lines 17366 17423 +57
Branches 1429 1430 +1
==========================================
+ Hits 17283 17344 +61
+ Misses 32 29 -3
+ Partials 51 50 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Owner
|
Thanks for this. |
bashtage
requested changes
Mar 25, 2026
Owner
bashtage
left a comment
There was a problem hiding this comment.
A few minor changes, mostly to preserve asserts that have been inserted for type checking. Overall looks very good.
bashtage
approved these changes
Mar 25, 2026
Owner
bashtage
left a comment
There was a problem hiding this comment.
LGTM. Will merge when green and push a new release soon.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Came across this while running tests - the formula-based restriction path had little coverage and a couple of UX issues, so here are tests plus small fixes
Test coverage for linear constraint parsing used by
quadratic_form_test. Also plus some small cleanups: strip LHS in_parse_single, clearer error ifformula=is passed without aSeries, remove redundant assertpytest linearmodels/tests/shared/test_hypotheses_constraints.py