[Pyunit-interest] Unitesting organisation
Brought to you by:
purcell
From: Joel Q. <joe...@ho...> - 2001-10-26 07:30:51
|
Hi all, I am new to unitTesting practice, I start using it after having red some article on Extreme Programming. I have start to implement it in an application I am currently writing. I need to do that to be able to improve it quicker, avoid spending time in debugging due to change. I ask myself many question about that. I have an application in Python to download web pages and extract some data from them. At starting point, I have used a configfile with the configParser Python object. Due to many value are not changing frequently (principaly url), I have put those variable directly in the Python code. Now, I have the following solution, a configfile and an object (which use the configParser object to parse the file) containing more constant variable in it. I have also implemented the singleton pattern in this object, this permit to avoid the parsing of the config file every time. I have implemented the folowing stuff: - I have put my test file in the same folder as the code file. - I use the httpServer in python to have a web server for testing My interrogation are : - should I implement a testing configfile and a testing parser object which contains variable too ? - What is the best solution to avoid name file conflict ? - Should I implement other way to put my testfile ? This is my current question. I hope to be clear enough (English is not my mother language). Thanks for your remarks, questions, and suggestions. Joel |