Connecting multiple test cases in a sort of pipe

Raghuram Devarakonda draghuram at gmail.com
Thu Jul 30 10:59:40 EDT 2009


On Jul 30, 2:43 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> Write a TestCase-subclass that simply works like this:
>
> class FileTests(TestCase):
>
>     def test_create(self):
>         self.created_file = create()
>         assert something
>
>     def test_list(self):
>         self.test_create()
>         delete(self.created_file)
>
> Passing state around is one of the reasons objects have been invented :)
> And nobody ever said that you can't invoke a test-method from somewhere
> else.

Just to be clear, are you suggesting that these tests be run by a
custom runnner rather than by the default runner from unittest?

Thanks,
Raghu



More information about the Python-list mailing list