Skip to content

Commit

Permalink
Pre-commit confirm test_lengths.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arrrrrmin committed Mar 5, 2024
1 parent b939f43 commit a4e6612
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/configs/example-config-amplitude.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ timeseries:
channel: 0
kinds:
- kind: amplitude
amplitude_factor: 2.0
amplitude_factor: 2.0
6 changes: 3 additions & 3 deletions tests/test_generator/test_lengths.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def setUp(self) -> None:
}
self.creeping_factor = 0.3

def update_config(self, l: int, include_creeping: bool = False):
self.config["timeseries"][0]["anomalies"][0]["length"] = l
cl = int(round(l * self.creeping_factor)) if include_creeping else 0
def update_config(self, length: int, include_creeping: bool = False):
self.config["timeseries"][0]["anomalies"][0]["length"] = length
cl = int(round(length * self.creeping_factor)) if include_creeping else 0
self.config["timeseries"][0]["anomalies"][0]["creeping-length"] = cl

def __run(self):
Expand Down

0 comments on commit a4e6612

Please sign in to comment.