<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I'm not sure if it makes a difference with generators, but I do know
    that py.test doesn't support "setUp" or "tearDown".  You have to use
    "setup" and "teardown" I believe.<br>
    <div class="moz-signature"><br>
      <b>Randy Syring</b><br>
      <small>Husband | Father | Redeemed Sinner</small><br>
      <br>
      <i><small>"For what does it profit a man to gain the whole world<br>
          and forfeit his soul?" (Mark 8:36 ESV)</small></i>
      <br>
      <br>
    </div>
    <div class="moz-cite-prefix">On 02/25/2016 12:14 PM, Fred Drake
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAFT4OTHWNDXWzJgy+spXxn7hbZd3AKciPuEZhT2OsTcaty_ZZw@mail.gmail.com"
      type="cite">
      <pre wrap="">I've got a body of tests we've been running using nose (not nose2),
and I'm looking at moving to py.test.  Mostly hasn't been a problem,
as most of the tests are written using unittest.TestCase.

We have a few cases where we're using generator functions to create
test cases, with each case being a constructed unittest.TestCase
instance.  py.test is getting these and running the __call__ method on
them, but the setUp and tearDown methods aren't getting invoked; they
are invoked under nose.

Is my expectation that py.test will handle the generated
unittest.TestCase instances the way nose does out of line?

I'm using py.test 2.5.1 using the stock package on Ubuntu 14.04.


  -Fred

</pre>
    </blockquote>
    <br>
  </body>
</html>