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

Method test_set_note

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

Source from the content-addressed store, hash-verified

43 self.assertEqual(59, int(self.b4))
44
45 def test_set_note(self):
46 n = Note()
47 self.assertTrue(n.set_note("C", 5, {}))
48 n.empty()
49 self.assertTrue(n.set_note("C-5"))
50 self.assertTrue(n.set_note("C", 5))
51 self.assertTrue(n.set_note("C#-12", 5))
52 self.assertRaises(NoteFormatError, n.set_note, "H")
53 self.assertRaises(NoteFormatError, n.set_note, "C 23")
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)

Callers

nothing calls this directly

Calls 3

set_noteMethod · 0.95
emptyMethod · 0.95
NoteClass · 0.90

Tested by

no test coverage detected