Re: unittest.Testsuite and execution order

2018-04-30 Thread George Fischhof
On 20 Apr 2018 8:39 am, "Chris Angelico" wrote: On Fri, Apr 20, 2018 at 3:01 PM, Francesco Russo wrote: > On 18/04/18 20:26, Chris Angelico wrote: >> This is a bad idea. Each function that starts test_ should be >> completely independent. You should be able to run any one of them on >> its own (

Re: unittest.Testsuite and execution order

2018-04-19 Thread Chris Angelico
On Fri, Apr 20, 2018 at 3:01 PM, Francesco Russo wrote: > On 18/04/18 20:26, Chris Angelico wrote: >> This is a bad idea. Each function that starts test_ should be >> completely independent. You should be able to run any one of them on >> its own (say, if you're trying to figure out why your lates

Re: unittest.Testsuite and execution order

2018-04-19 Thread Francesco Russo
On 18/04/18 20:26, Chris Angelico wrote: > On Thu, Apr 19, 2018 at 2:51 AM, Francesco Russo > wrote: >> My use case: my SUT is split into modules. Besides writing unit tests for >> each module, I want to write an integration test, and I also need to >> perform some actions between two calls to th

Re: unittest.Testsuite and execution order

2018-04-18 Thread Chris Angelico
On Thu, Apr 19, 2018 at 2:51 AM, Francesco Russo wrote: > My use case: my SUT is split into modules. Besides writing unit tests for > each module, I want to write an integration test, and I also need to > perform some actions between two calls to the SUT. In my case, the order of > the execution i

unittest.Testsuite and execution order

2018-04-18 Thread Francesco Russo
Hello! I'm reading the documentation of unittest.TestSuite (Python 2 and 3), but I can't find any explicit sentence stating that TestSuite will honor the order. I can only read that TestSuite can group test cases together. Please blame it on my poor English skills if I'm not interpreting the docum

Re: Execution order

2009-09-11 Thread DarkBlue
On Sep 11, 9:34 pm, "Diez B. Roggisch" wrote: > DarkBlue wrote: > > Here is some code from a pyqt4.5.4  application on python 2.6 > > > def findData(self): > > >       self.ui.label.setText('Processing... ') > > >       # here we do something which takes a few seconds > >       self.refreshGrid()

Re: Execution order

2009-09-11 Thread Diez B. Roggisch
DarkBlue wrote: > Here is some code from a pyqt4.5.4 application on python 2.6 > > def findData(self): > > self.ui.label.setText('Processing... ') > > # here we do something which takes a few seconds > self.refreshGrid() > > > > The problem is that the text in the self.ui.

Execution order

2009-09-11 Thread DarkBlue
Here is some code from a pyqt4.5.4 application on python 2.6 def findData(self): self.ui.label.setText('Processing... ') # here we do something which takes a few seconds self.refreshGrid() The problem is that the text in the self.ui.label is only changed on screen after th

Re: execution order in list/generator expression

2005-10-23 Thread [EMAIL PROTECTED]
Ah, no wonder. I test with p=[5,4]. thanks. so basically, I still need to expand it first given this behaviour. Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > > I am wondering how this is evaluated. > > > > a=(x for x in [1,2,3,4]) > > p=[4,5] > > > > c=[x for x in p if x in list(a)]

Re: execution order in list/generator expression

2005-10-23 Thread Devan L
[EMAIL PROTECTED] wrote: > Hi, > > I am wondering how this is evaluated. > > a=(x for x in [1,2,3,4]) > p=[4,5] > > c=[x for x in p if x in list(a)] > > c is [] > > but if I expand a first, like a = list(a) > > c is [4] > > So it seems that the "if" part don't get expanded ? Well, for every elemen

Re: execution order in list/generator expression

2005-10-23 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, > > I am wondering how this is evaluated. > > a=(x for x in [1,2,3,4]) > p=[4,5] > > c=[x for x in p if x in list(a)] > > c is [] No it isn't. In [1]: a=(x for x in [1,2,3,4]) In [2]: p=[4,5] In [3]: c=[x for x in p if x in list(a)] In [4]: c Out[4]: [4] I'm

execution order in list/generator expression

2005-10-23 Thread [EMAIL PROTECTED]
Hi, I am wondering how this is evaluated. a=(x for x in [1,2,3,4]) p=[4,5] c=[x for x in p if x in list(a)] c is [] but if I expand a first, like a = list(a) c is [4] So it seems that the "if" part don't get expanded ? -- http://mail.python.org/mailman/listinfo/python-list