forked from github.com/blag
added test
This commit is contained in:
@@ -275,6 +275,21 @@ foo bar
|
||||
blag.build(args)
|
||||
|
||||
|
||||
def test_remove_extra_files(args):
|
||||
# create a file and directory in output dir that have no corresponding
|
||||
# source
|
||||
file_path = f'{args.output_dir}/a'
|
||||
dir_path = f'{args.output_dir}/b'
|
||||
fh = open(file_path, 'w')
|
||||
fh.close()
|
||||
os.mkdir(dir_path)
|
||||
|
||||
blag.build(args)
|
||||
|
||||
assert not os.path.exists(file_path)
|
||||
assert not os.path.exists(dir_path)
|
||||
|
||||
|
||||
def test_main(cleandir):
|
||||
blag.main(['build'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user