MCPcopy
hub / github.com/burnash/gspread / test_get_notes

Method test_get_notes

tests/worksheet_test.py:1670–1698  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1668
1669 @pytest.mark.vcr()
1670 def test_get_notes(self):
1671 w = self.spreadsheet.worksheets()[0]
1672 notes = {
1673 "A1": "read my note",
1674 "B2": "Or don't",
1675 "A3": "another note",
1676 "C3": "test",
1677 }
1678 expected_notes = [
1679 [notes["A1"]],
1680 ["", notes["B2"]],
1681 ["another note", "", "test"],
1682 ]
1683
1684 expected_range_notes = [
1685 ["", "Or don't"],
1686 ["another note", "", "test"],
1687 ]
1688
1689 empty_notes = w.get_notes()
1690
1691 w.insert_notes(notes)
1692 range_notes = w.get_notes(grid_range="A2:C3")
1693
1694 all_notes = w.get_notes()
1695
1696 self.assertEqual(empty_notes, [[]])
1697 self.assertEqual(all_notes, expected_notes)
1698 self.assertEqual(range_notes, expected_range_notes)
1699
1700 @pytest.mark.vcr()
1701 def test_get_notes_2nd_sheet(self):

Callers

nothing calls this directly

Calls 3

worksheetsMethod · 0.80
get_notesMethod · 0.80
insert_notesMethod · 0.80

Tested by

no test coverage detected