def test_saveCSV():
    # Read in files, save to CSV, read from CSV, and confirm allclose
    for inst in Z_checks:
        if example_files[inst]:
            f, Z = readFile(os.path.join(directory, example_files[inst]), inst)
            saveCSV(f'{inst}_test', f, Z)
            f_read, Z_read = readCSV(f'{inst}_test.csv')
            assert (np.allclose(f, f_read)) and (np.allclose(Z, Z_read))
def test_readFile():

    f, Z = readFile('./data/exampleData.csv')

    assert (f == frequencies).all() and (Z == Z_correct).all()
Esempio n. 3
0
def test_readFile():
    for inst in Z_checks:
        if example_files[inst]:
            f, Z = readFile(os.path.join(directory, example_files[inst]), inst)
            assert (np.isclose(f, f_checks[inst])).all() \
                and (np.isclose(Z, Z_checks[inst])).all()
Esempio n. 4
0
def test_readFile():
    for inst in Z_checks:
        if example_files[inst]:
            f, Z = readFile(os.path.join(directory, example_files[inst]), inst)

            assert (f == f_checks[inst]).all() and (Z == Z_checks[inst]).all()