[TIP] [nose-users] Re: asking nose to use a different TestSuite class

Leah Klearman lklrmn at gmail.com
Thu Oct 1 17:25:17 PDT 2015


Hi Vijay/Ram/Vijayram,

I don't remember what I did or didn't do, and abandoned nose for a
different test runner quite some time ago. It looks like I didn't put
whatever I did in a repo either, so I'm afraid I can't help.

Sorry,
-Leah

On Thu, Oct 1, 2015 at 5:01 PM, <vijayram at dssd.com> wrote:

> Hi Leah,
>
>  I am facing this very issue... were you able to solve this... did it work
> for you.... just to give context, this is my sample plugin,
>
> class CaptureExecResults(Plugin, unittest.TestCase):
>
>
>     enabled = True
>
>     name = 'suite-loader'
>
>
>     def configure(self, options, conf):
>
>         Plugin.configure(self, options, conf)
>
>         print "--- Into configure"
>
>         names = ["UserManagementTestSuite.faas_runtime_error"]
>
>         self.suite = nose.loader.TestLoader().loadTestsFromNames(names,
> mod1)
>
>         #self.suite = unittest.TestLoader().loadTestsFromNames(names,
> mod1)
>
>         print self.suite
>
>
>     def prepareTestLoader(self, loader):
>
>         print "--- prepareTestLoader.."
>
>         loader.suiteClass = self.suite
>
>
> I am getting errors during execution....
>
>   File "/opt/tools/lib/python2.7/site-packages/nose/loader.py", line 355,
> in loadTestsFromModule
>
>     return self.suiteClass(ContextList(tests, context=module))
>
>   File "/opt/tools/lib/python2.7/site-packages/nose/suite.py", line 177,
> in __call__
>
>     return self.run(*arg, **kw)
>
>   File "/opt/tools/lib/python2.7/site-packages/nose/suite.py", line 218,
> in run
>
>     if result.shouldStop:
>
>   File "/opt/tools/lib/python2.7/site-packages/nose/proxy.py", line 30, in
> fget
>
>     return getattr(getattr(self, local_attr), proxied_attr)
>
> AttributeError: 'ContextList' object has no attribute 'shouldStop'
>
>
> Any suggestion or pointer...
>
>
> Thank you so much,
>
> On Wednesday, October 30, 2013 at 12:34:47 PM UTC-7, Leah Klearman wrote:
>>
>> I've mostly been able to make my new nose plugin work, but it is
>> disabling the built-in capture and logcapture plugins, and I can't find any
>> reference to how to make plugins not stomp on one another.
>>
>> Code is at https://gist.github.com/klrmn/7238776
>>
>> Thanks!
>> -Leah
>>
>>
>> On Sun, Oct 27, 2013 at 2:39 PM, Leah Klearman <lkl... at gmail.com> wrote:
>>
>>> I would like to use nose with testresources, which
>>> provides OptimisingTestSuite that orders tests in a particular way.
>>>
>>> https://github.com/nose-devs/nose/blob/master/nose/core.py#L309
>>> (nose.core.collector()) says "TestSuite replacement entry point. Use
>>> anywhere you might use a unittest.TestSuite.", but I have been thus-far
>>> unable to suss out how to replace nose.core.collector() at a time it will
>>> actually get used.
>>>
>>> Can anyone provide me with an example?
>>>
>>> Thanks,
>>> -Leah
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "nose-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nose-users+unsubscribe at googlegroups.com.
> To post to this group, send email to nose-users at googlegroups.com.
> Visit this group at http://groups.google.com/group/nose-users.
> For more options, visit https://groups.google.com/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20151001/f451543d/attachment.htm>


More information about the testing-in-python mailing list