Esempio n. 1
0
def test_write_read_data2(testdir):
    n1_node_data = {'a.py': [1]}
    td = CoreTestmonData(testdir.tmpdir.strpath, 'default')
    td.lastfailed = ['n1']
    td.write_data()
    td.set_dependencies('n1', n1_node_data, )
    td2 = CoreTestmonData(testdir.tmpdir.strpath, 'default')
    td2.read_data()
    assert td2.node_data['n1'] == n1_node_data
Esempio n. 2
0
def test_write_read_data2(testdir):
    td = TestmonData(testdir.tmpdir.strpath, 'default')
    td.mtimes = {'a.py': 1.0}
    td.node_data = {'n1': {'a.py': [1]}}
    td.lastfailed = ['n1']
    td.write_data()
    td2 = TestmonData(testdir.tmpdir.strpath, 'default')
    td2.read_data()
    assert td == td2
Esempio n. 3
0
 def test_write_read_data2(self, testdir):
     n1_node_data = {'test_a.py': [1]}
     td = CoreTestmonData(testdir.tmpdir.strpath, 'default')
     td.lastfailed = ['test_a.py::n1']
     td.write_data()
     td.set_dependencies('test_a.py::n1', n1_node_data, {})
     td2 = CoreTestmonData(testdir.tmpdir.strpath, 'default')
     td2.read_data()
     assert td2.node_data['test_a.py::n1'] == n1_node_data
     assert td2.f_tests['test_a.py'] == set(['test_a.py::n1'])