def test_0_copy_data (self): # Write the test data f = open(file_path1, "w") f.write(test_data) f.close() # copy the file main(["copy.py", file_path1, file_path2]) # Get the copied data f = open(file_path2, "r") data = f.read() f.close() # Check the data self.assertEqual (data, test_data, "Data of copied file doesn't match data written into the original file")
import sys from examples import main if __name__ == '__main__': main()
import examples examples.main()
def get(self, food_list): return {'data': examples.main(food_list)}
def init(): print('Generating examples.') examples.main()