def test_blast_space(self): """ Test that setting the lineage name gives the blast cell. """ c = Cell(name="carrots") c.lineageName("a tahsuetoahusenoatu") self.assertEqual(c.blast(), "a")
def test_blast_dot(self): """ Test that setting the lineage name gives the blast cell. """ c = Cell(name="peas") c.lineageName("ab.tahsuetoahusenoatu") self.assertEqual(c.blast(), "ab")
def test_daughterOf(self): """ Test that we can get the parent of a cell """ base = "ab.tahsuetoahusenoat" child = base + "u" p = Cell(name="peas") p.lineageName(base) p.save() c = Cell(name="carrots") c.lineageName(child) c.save() parent_p = c.daughterOf().name() self.assertEqual("peas", parent_p)
def test_parentOf(self): """ Test that we can get the children of a cell Tests for anterior, posterior, left, right, ventral, dorsal divisions """ p = Cell(name="peas") base = 'ab.tahsuetoahusenoat' p.lineageName(base) p.save() c = ["carrots", "jam", "peanuts", "celery", "tuna", "chicken"] division_directions = "alvpdr" for x, l in zip(c, division_directions): ln = base + l Cell(name=x, lineageName=ln).save() names = set(str(x.name()) for x in p.parentOf()) self.assertEqual(set(c), names)
def test_lineageName(self): """ Test that we can retrieve the lineage name """ c = Cell(name="ADAL", conf=self.config) c.lineageName("AB plapaaaapp") c.save() self.assertEqual("AB plapaaaapp", Cell(name="ADAL").lineageName())