Esempio n. 1
0
def test_get_num_terms_mix():
    # Lab options have a greater priority than machine options
    lab = Lab('mem_test')
    lab.add_option("num_terms", "2")
    kwargs = {"num_terms": "1"}
    device1 = Machine(lab, "test_machine1", **kwargs)
    device2 = Machine(lab, "test_machine2")
    assert device1.get_num_terms() == 2
    assert device2.get_num_terms() == 2
Esempio n. 2
0
def test_get_num_terms_from_lab_options():
    lab = Lab('mem_test')
    lab.add_option("num_terms", "2")
    device = Machine(lab, "test_machine")
    assert device.get_num_terms() == 2
Esempio n. 3
0
def test_get_mem_from_lab_options():
    lab = Lab('mem_test')
    lab.add_option("mem", "150m")
    device = Machine(lab, "test_machine")
    assert device.get_mem() == "150m"