a b/tests/surrogates/test_generate_surrogates.py
1
import argparse
2
import filecmp
3
from os.path import dirname, join
4
5
from deidentify.surrogates import generate_surrogates
6
7
8
def test_generate_surrogates(tmpdir):
9
    dataset_path = join(dirname(__file__), 'data/original')
10
    expected = join(dirname(__file__), 'data/annotations-rewrite-table.csv')
11
    actual = join(tmpdir, 'surrogates.actual.csv')
12
13
    args = argparse.Namespace(dataset_path=dataset_path, output_file=actual)
14
    generate_surrogates.main(args)
15
    assert filecmp.cmp(expected, actual)