Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 29, 2024
1 parent 9263837 commit 7f16257
Showing 1 changed file with 48 additions and 2 deletions.
50 changes: 48 additions & 2 deletions pysr/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,30 @@ def test_sequence_variable_names(self):
print(sequence_variable_names)
self.assertListEqual(
list(sequence_variable_names),
[['x0_tm3', 'x1_tm3', 'x2_tm3', 'x0_tm2', 'x1_tm2', 'x2_tm2', 'x0_tm1', 'x1_tm1', 'x2_tm1'], ['x₀[t-3]', 'x₁[t-3]', 'x₂[t-3]', 'x₀[t-2]', 'x₁[t-2]', 'x₂[t-2]', 'x₀[t-1]', 'x₁[t-1]', 'x₂[t-1]']]
[
[
"x0_tm3",
"x1_tm3",
"x2_tm3",
"x0_tm2",
"x1_tm2",
"x2_tm2",
"x0_tm1",
"x1_tm1",
"x2_tm1",
],
[
"x₀[t-3]",
"x₁[t-3]",
"x₂[t-3]",
"x₀[t-2]",
"x₁[t-2]",
"x₂[t-2]",
"x₀[t-1]",
"x₁[t-1]",
"x₂[t-1]",
],
],
)

def test_sequence_custom_variable_names(self):
Expand All @@ -713,7 +736,30 @@ def test_sequence_custom_variable_names(self):
sequence_variable_names = model._construct_variable_names(3, variable_names)
self.assertListEqual(
list(sequence_variable_names),
[['a_tm3', 'b_tm3', 'c_tm3', 'a_tm2', 'b_tm2', 'c_tm2', 'a_tm1', 'b_tm1', 'c_tm1'], ['a[t-3]', 'b[t-3]', 'c[t-3]', 'a[t-2]', 'b[t-2]', 'c[t-2]', 'a[t-1]', 'b[t-1]', 'c[t-1]']],
[
[
"a_tm3",
"b_tm3",
"c_tm3",
"a_tm2",
"b_tm2",
"c_tm2",
"a_tm1",
"b_tm1",
"c_tm1",
],
[
"a[t-3]",
"b[t-3]",
"c[t-3]",
"a[t-2]",
"b[t-2]",
"c[t-2]",
"a[t-1]",
"b[t-1]",
"c[t-1]",
],
],
)

def test_sequence_unused_variables(self):
Expand Down

0 comments on commit 7f16257

Please sign in to comment.