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

Method test_to_hertz

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

Source from the content-addressed store, hash-verified

54 self.assertRaises(NoteFormatError, n.set_note, "C# 123")
55
56 def test_to_hertz(self):
57 self.assertEqual(Note("A", 0).to_hertz(), 27.5)
58 self.assertEqual(Note("A", 1).to_hertz(), 55)
59 self.assertEqual(Note("A", 2).to_hertz(), 110)
60 self.assertEqual(Note("A", 3).to_hertz(), 220)
61 self.assertEqual(Note("A", 4).to_hertz(), 440)
62 self.assertEqual(Note("A", 5).to_hertz(), 880)
63 self.assertEqual(Note("A", 6).to_hertz(), 1760)
64
65 def test_from_hertz(self):
66 a = Note()

Callers

nothing calls this directly

Calls 2

NoteClass · 0.90
to_hertzMethod · 0.80

Tested by

no test coverage detected