Re: [Tutor] About Using timeout Mark in Pytest
I'm guessing the decorator is using method='thread', which is the default and aborts the process when timeout occurs. Can you see if your env supports method='signal' and if this resolves the issue? @pytest.mark.timeout(method='signal') Reference guide for supported options is here: https://pypi.python.org/pypi/pytest-timeout -Rohit > On Aug 20, 2016, at 3:37 PM, Michelle Meiduo Wu wrote: > > Hi there, > > > I'd like to use @pytest. mark.timeout in pytest test in Windows. But if one > of test cases is timeout, then the following test cases will stop. > > > Is there anybody know how to continue to run the following test cases if a > test case is timeout? > > > Thank you in advance. > > > Michelle > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] Assigning multi line value to a variable
Hi, I am using Centos 6.3 and python 2.6.6. When I try to assign a variables value inside a multiple line message, it does not work. >>>cardName = "ActualCardName" >>>data = """ """ >>> print data I would like %cardName to be replaced by "actualCardName". As you can see I am trying to use XML and therefore I will have several such replacements that I will need to do. If someone can suggest a clean way for me to achieve my goal, that would be great. Please note, my input is going to be several lines long. thanks, Rohit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Trying to avoid using eval..
Hi All, I want to reload my Module after I fix bugs and want to instantiate an object of a class contained in this module. Heres the pseudo code of what I want to do: def rerun(testBlock) : op = testBlock.split('.') module = op[0] ; className = op[1] reload(module) # testBlock is a string, so it needs evaluation! newObject = testBlock() rerun('ModuleName.className') Obviously, line 4 and line 6 dont work today. I want to know if there is any smart way to achieve this. In my previous life (Tcl), I could use 'eval' or 'set' to achieve this. thanks, Rohit ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor