Re: Python automatic testing: mocking an imported module?

2007-03-29 Thread [EMAIL PROTECTED]
On Mar 27, 9:13 pm, Chris Lasher [EMAIL PROTECTED] wrote: On Mar 27, 6:18 pm, Silfheed [EMAIL PROTECTED] wrote: Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to

Re: Python automatic testing: mocking an imported module?

2007-03-29 Thread Silfheed
Wow, that works great! Thanks all! On Mar 28, 12:02 am, Ben Finney [EMAIL PROTECTED] wrote: Silfheed [EMAIL PROTECTED] writes: = foo.py = class Bar(object): def __init__(self): self.name = bar = = dostuff.py = import foo def get_bar(): return

Re: Python automatic testing: mocking an imported module?

2007-03-28 Thread Peter Otten
Silfheed wrote: So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing the code for testee.py. testee.py has a module in it that we

Re: Python automatic testing: mocking an imported module?

2007-03-28 Thread Mark T
Silfheed [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing

Python automatic testing: mocking an imported module?

2007-03-27 Thread Silfheed
Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing the code for testee.py. testee.py has a module in it that we want to mock

Re: Python automatic testing: mocking an imported module?

2007-03-27 Thread Chris Lasher
On Mar 27, 6:18 pm, Silfheed [EMAIL PROTECTED] wrote: Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing the code for

Re: Python automatic testing: mocking an imported module?

2007-03-27 Thread Ben Finney
Silfheed [EMAIL PROTECTED] writes: So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. This is sometimes called the module under test. I wish there was a more succinct name in common usage. We want