MCPcopy Create free account
hub / github.com/PyTables/PyTables / OldRecord

Class OldRecord

tables/tests/test_tables.py:96–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95# Old fashion of defining tables (for testing backward compatibility)
96class OldRecord(tb.IsDescription):
97 var1 = tb.StringCol(itemsize=4, dflt=b"abcd", pos=0)
98 var2 = tb.Col.from_type("int32", (), 1, pos=1)
99 var3 = tb.Col.from_type("int16", (), 2, pos=2)
100 var4 = tb.Col.from_type("float64", (), 3.1, pos=3)
101 var5 = tb.Col.from_type("float32", (), 4.2, pos=4)
102 var6 = tb.Col.from_type("uint16", (), 5, pos=5)
103 var7 = tb.StringCol(itemsize=1, dflt=b"e", pos=6)
104 var8 = tb.Col.from_type("bool", shape=(), dflt=1, pos=7)
105 var9 = tb.ComplexCol(itemsize=8, shape=(), dflt=(0.0 + 1.0j), pos=8)
106 var10 = tb.ComplexCol(itemsize=16, shape=(), dflt=(1.0 - 0.0j), pos=9)
107 if hasattr(tb, "Float16Col"):
108 var11 = tb.Col.from_type("float16", (), 6.4)
109 if hasattr(tb, "Float96Col"):
110 var12 = tb.Col.from_type("float96", (), 6.4)
111 if hasattr(tb, "Float128Col"):
112 var13 = tb.Col.from_type("float128", (), 6.4)
113 if hasattr(tb, "Complex192Col"):
114 var14 = tb.ComplexCol(itemsize=24, shape=(), dflt=(1.0 - 0.0j))
115 if hasattr(tb, "Complex256Col"):
116 var15 = tb.ComplexCol(itemsize=32, shape=(), dflt=(1.0 - 0.0j))
117
118
119class BasicTestCase(common.TempFileMixin, common.PyTablesTestCase):

Callers

nothing calls this directly

Calls 1

from_typeMethod · 0.45

Tested by

no test coverage detected