Re: unittest: collecting tests from many modules?

2005-07-04 Thread Jorgen Grahn
On 12 Jun 2005 10:14:50 GMT, Jorgen Grahn <[EMAIL PROTECTED]> wrote: [regarding module unittest] > What's the best way of creating a test.py which > - aggregates the tests from all the test_*.py modules? > - doesn't require me to enumerate all the test classes in test.py > (forcing each module

Re: unittest: collecting tests from many modules?

2005-06-26 Thread George Sakkis
"Robert Brewer" <[EMAIL PROTECTED]> wrote: > Anyway, use normal os.walk() calls to gather the files which start with > "test_"; then use the TestLoader.loadTestsFromName method to instruct > unittest to test them as a group. Hi Robert, this makes much more sense; os.walk and TestLoader.loadTests

RE: unittest: collecting tests from many modules?

2005-06-26 Thread Robert Brewer
"Jorgen Grahn" wrote: > I have a set of tests in different modules: test_foo.py, > test_bar.py and so on. All of these use the simplest > possible internal layout: a number of classes containing > test*() methods, and the good old lines at the end: > >> > >> if __name__ == "__main__": > >>

Re: unittest: collecting tests from many modules?

2005-06-26 Thread George Sakkis
"Bengt Richter" <[EMAIL PROTECTED]> wrote: > On 12 Jun 2005 08:06:18 -0700, "George Sakkis" <[EMAIL PROTECTED]> wrote: > > >I had written a script to do something close to this; currently it > >doesn't do any kind of aggregation, but it should be easy to extend it > >as you like. What I don't like

Re: unittest: collecting tests from many modules?

2005-06-26 Thread Benji York
"Jorgen Grahn" wrote: >What's the best way of creating a test.py which >- aggregates the tests from all the test_*.py modules? You might want to check out the test runner in Zope 3 (svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app/testing) It aggregates test reporting, does code coverage,

Re: unittest: collecting tests from many modules?

2005-06-26 Thread Bengt Richter
On 12 Jun 2005 08:06:18 -0700, "George Sakkis" <[EMAIL PROTECTED]> wrote: >"Jorgen Grahn" wrote: > >> I have a set of tests in different modules: test_foo.py, test_bar.py and so >> on. All of these use the simplest possible internal layout: a number of >> classes containing test*() methods, and th

Re: unittest: collecting tests from many modules?

2005-06-12 Thread Scott David Daniels
Jorgen Grahn wrote: > I have a set of tests in different modules: test_foo.py, test_bar.py and so > on. All of these use the simplest possible internal layout: a number of > classes containing test*() methods, and the good old lines at the end: > if __name__ == "__main__": > unittest.main()

Re: unittest: collecting tests from many modules?

2005-06-12 Thread George Sakkis
"Jorgen Grahn" wrote: > I have a set of tests in different modules: test_foo.py, test_bar.py and so > on. All of these use the simplest possible internal layout: a number of > classes containing test*() methods, and the good old lines at the end: > > if __name__ == "__main__": > unittest.m

Re: unittest: collecting tests from many modules?

2005-06-12 Thread John Roth
"Jorgen Grahn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a set of tests in different modules: test_foo.py, test_bar.py and so > on. All of these use the simplest possible internal layout: a number of > classes containing test*() methods, and the good old lines at the end: