[email protected] wrote:
Dear All,

Quick UT question. I am working on a CSV processing script. I want to write some tests. The tests will need to read in, manipulate and write out some CSV files.
My instinct is to manually construct some small data files, and consider them 
as part of the test suite. The other option would be to programatically 
construct them (? As a set-up).

Which is better?
Thanks,

Matt


Sent from my BlackBerry® wireless device
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

I guess this depends on what part of your program you are testing.

If you are testing small 'nuts and bolts' part of the script I usually have the test data written into the test as global variables.

As your functionality becomes more complete, you probably need to switch to importing a test data file.

I agree I'd manually construct some data files. But if you want to test directory/file creation you could programaticaly create a test directory in /tmp/ to test on.

T
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to