Beispiel #1
0
def test_canvas_add_op(session):

    canvas = Planner(session)
    canvas.create_operation_by_name("Yeast Transformation")
    canvas.create_operation_by_name("Yeast Antibiotic Plating")
    canvas.quick_wire_by_name("Yeast Transformation", "Yeast Antibiotic Plating")
    canvas.create()

    p = session.Plan.find(canvas.plan.id)
    pass
Beispiel #2
0
def test_annotate_layout(session):

    canvas = Planner(session)

    ops = canvas.chain("Make PCR Fragment", "Run Gel", category="Cloning")
    canvas.layout.topo_sort()
    canvas.layout.move(100, 200)

    a = canvas.annotate_above_layout("This is an annotation", 100, 50)

    anchor = a["anchor"]
    xmidpoint = a["x"] + anchor["x"] / 2
    ybottom = a["y"] + anchor["y"]

    assert xmidpoint == 100 + canvas.layout.BOX_WIDTH / 2
    assert ybottom == 200 - canvas.layout.BOX_DELTA_Y / 2

    canvas.plan.name = "annotation test"
    canvas.create()
    print(canvas.url)
Beispiel #3
0
def test_canvas_create(session):
    canvas = Planner(session)
    canvas.create()
    assert canvas.plan.id