1

I have a program where the input is a complex file and the output is a changed file but in the same format. These files are of points and connections in 3D models. I need to be able to unit test this program without checking files line by line myself for equality. Something like a version control 'diff' would be ideal in terms of viewing differences but I don't know of a program or framework that could automate this process. Any suggestions?

razlebe
  • 7,064
  • 6
  • 40
  • 55
Mark
  • 11
  • 1

2 Answers2

0

If you're a Perl person you might want to take a look at Test::Files that does file comparisons with a diff-style diagnostic output.

adrianh
  • 1,708
  • 1
  • 13
  • 15
0

You can use difflib http://docs.python.org/library/difflib.html

Related: Comparing two .txt files using difflib in Python

Community
  • 1
  • 1
Unapiedra
  • 13,615
  • 10
  • 59
  • 86