def test_testrunresult_write(): """ TestrunResult.write() works This tests for a bug where TestrunResult.write() wrote a file containing {}, essentially if it dumps a file that is equal to what was provided then it's probably working """ with utils.resultfile() as f: result = results.load_results(f.name) with utils.tempdir() as tdir: result.write(os.path.join(tdir, 'results.json')) new = results.load_results(os.path.join(tdir, 'results.json')) nt.assert_dict_equal(result.__dict__, new.__dict__)
def test_initialize_summary(): """ Test that Summary initializes """ with utils.resultfile() as tfile: test = summary.Summary([tfile.name]) assert test
def test_load_results_file(): """ Test that load_results takes a file """ with utils.resultfile() as tfile: backends.json.load_results(tfile.name)
def test_load_results_file(): """backends.json.load_results: Loads a file passed by name""" with utils.resultfile() as tfile: backends.json.load_results(tfile.name, "none")
def test_load_results_file(): """ Test that load_results takes a file """ with utils.resultfile() as tfile: results.load_results(tfile.name)
def test_initialize_summary(): """summary.Summary: class initializes""" with utils.resultfile() as tfile: summary.Summary([tfile.name])