PyUnit and multiple test scripts
From: Calvin Spealman (calvin_at_ironfroggy.com)
Date: 02/27/05
- Next message: steven_at_lczmsoft.com: "Re: Problem When Unit Testing with PMock"
- Previous message: M.E.Farmer: "Re: Is it possible to pass a parameter by reference?"
- Next in thread: Peter Hansen: "Re: PyUnit and multiple test scripts"
- Reply: Peter Hansen: "Re: PyUnit and multiple test scripts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: python-list@python.org Date: Sat, 26 Feb 2005 23:06:16 +0000
I'm trying to find the best way to use PyUnit and organize my test scripts.
What I really want is to separate all my tests into 'test' directories
within each module of my project. I want all the files there to define a
'suite' callable and to then all all those suites from all those test
directories into one big suite and run it all. I'm having trouble with
this.
My first barrier was just loading the modules. As I had to be able to find
them automatically (would be tedious to maintain a manual list of them) I
needed to then load the modules from the paths to the files after I found
them. This wasn't working, I just couldn't get it to load. I couldn't
understand the imp module correctly.
1) Is there a very simple way to just take a file path and name, that I
could use to open the source file, and load it as a module object, no
strings attached?
2) Is there already a framework around that will do what I need?
I've tried py.test, but I really do not like the way it displays results.
- Next message: steven_at_lczmsoft.com: "Re: Problem When Unit Testing with PMock"
- Previous message: M.E.Farmer: "Re: Is it possible to pass a parameter by reference?"
- Next in thread: Peter Hansen: "Re: PyUnit and multiple test scripts"
- Reply: Peter Hansen: "Re: PyUnit and multiple test scripts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|