6 from ppu_tu import setup, teardown, find_in_path # noqa
11 test_prog_path = find_in_path('cmp.py')
12 if not test_prog_path:
13 sys.exit("Cannot find cmp.py in %s" % os.environ["PATH"])
16 def create_file(name, content):
17 with open(name, 'w') as fp:
22 create_file('test1', 'test')
23 create_file('test2', 'test')
24 assert subprocess.call(
25 [sys.executable, test_prog_path, "-i", "test1", "test2"]) == 0
27 create_file('test3', 'test3')
28 create_file('test4', 'test4')
29 assert subprocess.call(
30 [sys.executable, test_prog_path, "-i", "test3", "test4"]) == 1