Skip to content

Commit c06b90b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c8b8909 commit c06b90b

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

test_min_cost_string_conversion.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
import pytest
2-
from strings.min_cost_string_conversion import compute_transform_tables, assemble_transformation
2+
from strings.min_cost_string_conversion import (
3+
compute_transform_tables,
4+
assemble_transformation,
5+
)
6+
37

48
def test_empty_strings():
5-
costs, ops = compute_transform_tables("", "", 1,1,1,1)
9+
costs, ops = compute_transform_tables("", "", 1, 1, 1, 1)
610
assert costs == [[0]]
711
assert assemble_transformation(ops, 0, 0) == []
812

13+
914
def test_copy_only():
10-
costs, ops = compute_transform_tables("abc", "abc", 1,2,3,3)
15+
costs, ops = compute_transform_tables("abc", "abc", 1, 2, 3, 3)
1116
assert costs[-1][-1] == 3 # cost = sum of copy costs
12-
assert assemble_transformation(ops, len(ops)-1, len(ops[0])-1) == ["Ca", "Cb", "Cc"]
17+
assert assemble_transformation(ops, len(ops) - 1, len(ops[0]) - 1) == [
18+
"Ca",
19+
"Cb",
20+
"Cc",
21+
]
22+
1323

1424
def test_insert_only():
15-
costs, ops = compute_transform_tables("", "xyz", 1,1,1,1)
16-
seq = assemble_transformation(ops, 0, len(ops[0])-1)
25+
costs, ops = compute_transform_tables("", "xyz", 1, 1, 1, 1)
26+
seq = assemble_transformation(ops, 0, len(ops[0]) - 1)
1727
assert seq == ["Ix", "Iy", "Iz"]

0 commit comments

Comments
 (0)