MCPcopy Create free account
hub / github.com/Notgnoshi/generative / test_stack

Method test_stack

tests/test_interpreter.py:107–115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

105 self.assertTrue(actual.equals_exact(desired, tolerance=1e-6))
106
107 def test_stack(self):
108 commands = io.StringIO("FF[+FF]-FF")
109 expected = [
110 LineString([(0, 0, 0), (0, 0, 2), (0, -2, 2)]),
111 LineString([(0, 0, 2), (0, 2, 2)]),
112 ]
113 tokens = self.i.tokenize(commands)
114 lines = list(self.i.interpret(tokens))
115 self.assertListEqual(lines, expected)
116
117 def test_orientation_change_doesnt_drop_points(self):
118 # little 'f' means step forward without drawing, so this shouldn't generate a line.

Callers

nothing calls this directly

Calls 3

LineStringClass · 0.90
tokenizeMethod · 0.80
interpretMethod · 0.80

Tested by

no test coverage detected