Ejemplo n.º 1
0
def test_txt2json_correct():
    """test whether json corpus has correct length"""
    global out_dir
    wp2txt2json_run.main(txt2json_param_file)
    with open(path.join(out_dir, "wiki.json")) as f:
        assert_true(len(f.readlines()) == 5)
Ejemplo n.º 2
0
def test_txt2json_creates():
    """test whether json corpus was created"""
    global out_dir
    wp2txt2json_run.main(txt2json_param_file)
    assert_true(path.exists(path.join(out_dir, "wiki.json")))