def test_aggregate(stasis): aggregator = Aggregator( { 'infiles': [f'{parent}/../test.txt'], 'dir': f'{parent}/../results' }, stasis) aggregator.aggregate()
def test_aggregate_no_args(stasis): aggregator = Aggregator({}, stasis) try: aggregator.aggregate() fail() except KeyError: pass
def test_aggregate_file_not_found(stasis): aggregator = Aggregator(args=parser.parse_args(['--files', 'bad.txt']), stasis=stasis) try: aggregator.aggregate() fail() except FileNotFoundError: pass
def test_aggregate_extra_files(stasis): aggregator = Aggregator( { 'infiles': [f'{parent}/../test.txt'], 'dir': f'{parent}/../results', 'extra_files': True }, stasis) aggregator.aggregate()
def test_aggregate_norepl(stasis): aggregator = Aggregator( { 'infiles': [f'{parent}/../test.txt'], 'dir': f'{parent}/../results', 'exclude_replacement': True }, stasis) aggregator.aggregate()