Skip to content

Commit

Permalink
Update test_need_tbf writing of range
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarize committed Oct 27, 2023
1 parent f23cc2b commit c14647a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/test_convert_tbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,14 @@ def test_needles_convert_tbf_to_u01(self):
self.addCleanup(os.remove, file1)
self.addCleanup(os.remove, file2)

def test_load_save(self):
f_pattern = read_tbf("needle_change.tbf")
write_tbf(f_pattern, "needle_change2.tbf")

def test_needle_tbf_range(self):
file1 = "test_range5.tbf"
file1 = "test_range7.tbf"
pattern = EmbPattern()
pattern.metadata("name", "colorswitch5")
pattern.metadata("name", "colorswitch7")
pattern += "red"
pattern += "blue"
pattern += "green"
Expand All @@ -225,17 +229,17 @@ def test_needle_tbf_range(self):
pattern += "khaki"
pattern += "oldlace"

pattern.needle_change(needle=1)
pattern.needle_change(needle=3)
pattern += (0, 0), (0, 100), (100, 100), (100, 0), (0, 0)
pattern.add_command(MATRIX_TRANSLATE, 25, 25)
pattern.add_command(MATRIX_ROTATE, 360.0 / 3)

pattern.needle_change(needle=2)
pattern.needle_change(needle=4)
pattern += (0, 0), (0, 100), (100, 100), (100, 0), (0, 0)
pattern.add_command(MATRIX_TRANSLATE, 25, 25)
pattern.add_command(MATRIX_ROTATE, 360.0 / 3)

pattern.needle_change(needle=3)
pattern.needle_change(needle=5)
pattern += (0, 0), (0, 100), (100, 100), (100, 0), (0, 0)

write_tbf(pattern, file1)
Expand Down

0 comments on commit c14647a

Please sign in to comment.