[7fc5df]: / tests / surrogates / test_generate_surrogates.py

Download this file

16 lines (11 with data), 502 Bytes

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