MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / test_basic

Function test_basic

tools/python-3.11.9-amd64/Tools/demo/spreadsheet.py:797–816  ·  view source on GitHub ↗

Basic non-gui self-test.

()

Source from the content-addressed store, hash-verified

795
796
797def test_basic():
798 "Basic non-gui self-test."
799 a = Sheet()
800 for x in range(1, 11):
801 for y in range(1, 11):
802 if x == 1:
803 cell = NumericCell(y)
804 elif y == 1:
805 cell = NumericCell(x)
806 else:
807 c1 = cellname(x, 1)
808 c2 = cellname(1, y)
809 formula = "%s*%s" % (c1, c2)
810 cell = FormulaCell(formula)
811 a.setcell(x, y, cell)
812## if os.path.isfile("sheet1.xml"):
813## print "Loading from sheet1.xml"
814## a.load("sheet1.xml")
815 a.display()
816 a.save("sheet1.xml")
817
818def test_gui():
819 "GUI test."

Callers

nothing calls this directly

Calls 7

setcellMethod · 0.95
displayMethod · 0.95
saveMethod · 0.95
SheetClass · 0.85
NumericCellClass · 0.85
cellnameFunction · 0.85
FormulaCellClass · 0.85

Tested by

no test coverage detected