MCPcopy Create free account
hub / github.com/bspaans/python-mingus / test_from_hertz

Method test_from_hertz

tests/unit/containers/test_note.py:65–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 self.assertEqual(Note("A", 6).to_hertz(), 1760)
64
65 def test_from_hertz(self):
66 a = Note()
67 self.assertEqual(a.from_hertz(55.5), Note("A", 1))
68 self.assertEqual(a.from_hertz(110), Note("A", 2))
69 a.from_hertz(220)
70 self.assertEqual(a, Note("A", 3))
71 a.from_hertz(440)
72 self.assertEqual(a, Note("A", 4))
73 a.from_hertz(880)
74 self.assertEqual(a, Note("A", 5))
75 a.from_hertz(1760)
76 self.assertEqual(a, Note("A", 6))
77
78 def test_transpose(self):
79 a = Note("C")

Callers

nothing calls this directly

Calls 2

from_hertzMethod · 0.95
NoteClass · 0.90

Tested by

no test coverage detected