MCPcopy Index your code
hub / github.com/clips/pattern / setUp

Method setUp

test/test_db.py:448–464  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

446class TestTable(unittest.TestCase):
447
448 def setUp(self):
449 # Define self.db in a subclass.
450 # Create test tables.
451 self.db.create("persons", fields=[
452 db.primary_key("id"),
453 db.field("name", db.STRING)
454 ])
455 self.db.create("products", fields=[
456 db.primary_key("id"),
457 db.field("name", db.STRING),
458 db.field("price", db.FLOAT, default=0.0)
459 ])
460 self.db.create("orders", fields=[
461 db.primary_key("id"),
462 db.field("person", db.INTEGER, index=True),
463 db.field("product", db.INTEGER, index=True),
464 ])
465
466 def tearDown(self):
467 # Drop test tables.

Callers

nothing calls this directly

Calls 1

createMethod · 0.80

Tested by

no test coverage detected