Skip to content

Commit

Permalink
double decorate
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Nov 13, 2020
1 parent 3ef3dab commit f3b9c38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/models/test_hparams.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def wrapper(*args, **kwargs):
class SaveHparamsDecoratedModel(BoringModel):
""" Tests that a model can take an object """
@decorate
@decorate
def __init__(self, hparams, *my_args, **my_kwargs):
super().__init__()
self.save_hyperparameters(hparams)
Expand All @@ -63,6 +64,7 @@ def __init__(self, hparams, *my_args, **my_kwargs):
class AssignHparamsDecoratedModel(BoringModel):
""" Tests that a model can take an object with explicit setter"""
@decorate
@decorate
def __init__(self, hparams, *my_args, **my_kwargs):
super().__init__()
self.hparams = hparams
Expand Down

0 comments on commit f3b9c38

Please sign in to comment.