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

Method test_abs

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

Source from the content-addressed store, hash-verified

620 return db.Query(Table(), *args, **kwargs)
621
622 def test_abs(self):
623 # Assert absolute fieldname for trivial cases.
624 self.assertEqual(db.abs("persons", "name"), "persons.name")
625 self.assertEqual(db.abs("persons", ("id", "name")), ["persons.id", "persons.name"])
626 # Assert absolute fieldname with SQL functions (e.g., avg(product.price)).
627 for f in db.sql_functions.split("|"):
628 self.assertEqual(db.abs("persons", "%s(name)" % f), "%s(persons.name)" % f)
629 print "pattern.db.abs()"
630
631 def test_cmp(self):
632 # Assert WHERE-clause from cmp() function.

Callers

nothing calls this directly

Calls 2

absMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected