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

Method test_roll

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

Source from the content-addressed store, hash-verified

86 self.assertTrue(actual.equals_exact(desired, tolerance=1e-6))
87
88 def test_roll(self):
89 # Roll is about the longitudinal axis, so roll + forward won't change direction.
90 commands = io.StringIO(">+F")
91 expected = [LineString([(0, 0, 0), (1, 0, 0)])]
92 tokens = self.i.tokenize(commands)
93 lines = list(self.i.interpret(tokens))
94 self.assertEqual(len(lines), len(expected))
95 for actual, desired in zip(lines, expected):
96 self.assertTrue(actual.equals_exact(desired, tolerance=1e-6))
97
98 def test_flip(self):
99 commands = io.StringIO("F|F")

Callers

nothing calls this directly

Calls 3

LineStringClass · 0.90
tokenizeMethod · 0.80
interpretMethod · 0.80

Tested by

no test coverage detected