コード例 #1
0
ファイル: test_collection.py プロジェクト: lydiash/pyrelate
 def test_get(self):
     my_col = AtomsCollection("A", "./tests/results")
     result = "Random test result"
     desc = "test"
     aid = "12"
     my_col.store.store(result, desc, aid, arg_a=1, arg_b=2)
     ret_val3 = my_col.get(desc, aid, arg_a=1, arg_b=2)
     assert ret_val3 == result
     shutil.rmtree("./tests/results")
コード例 #2
0
ファイル: test_collection.py プロジェクト: lydiash/pyrelate
 def test_get_no_aid(self):
     my_col = AtomsCollection("A", "./tests/results")
     result = "Random test result"
     desc = "test"
     aid = "12"
     aid2 = "13"
     my_col["12"] = "test"
     my_col["13"] = "test2"
     my_col.store.store(result, desc, aid, arg_a=1, arg_b=2)
     my_col.store.store(result, desc, aid2, arg_a=1, arg_b=2)
     ret_val3 = my_col.get(desc, arg_a=1, arg_b=2)
     assert type(ret_val3) is dict
     assert len(ret_val3) is 2
     shutil.rmtree("./tests/results")