Skip to content

Commit

Permalink
Compare attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein committed Jul 24, 2024
1 parent b092788 commit 00c3d2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_metalearner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,12 +1125,16 @@ def test_validate_outcome_different_classes(implementation, use_pandas, rng):
"implementation",
[TLearner, SLearner, XLearner, RLearner, DRLearner],
)
def test_init_args_smoke(implementation):
def test_init_args(implementation):
ml = implementation(
True,
2,
LogisticRegression,
LinearRegression,
LogisticRegression,
)
implementation(**ml.init_args)
ml2 = implementation(**ml.init_args)

assert set(ml.__dict__.keys()) == set(ml2.__dict__.keys())
for key in ml.__dict__:
assert ml.__dict__[key] == ml2.__dict__[key]

0 comments on commit 00c3d2b

Please sign in to comment.