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