Re: Some excellent pytest articles/presentations

2020-03-16 Thread Edward K. Ream
On Mon, Mar 16, 2020 at 4:08 PM Brian Theado wrote: > > > On Mon, Mar 16, 2020 at 6:23 AM Edward K. Ream > wrote: > >> When I awoke this morning I understood why you might suggest this. It >> would, supposedly, make it possible to instantiate multiple instances of >> the LeoApp class. I have ju

Re: Some excellent pytest articles/presentations

2020-03-16 Thread Brian Theado
On Mon, Mar 16, 2020 at 6:23 AM Edward K. Ream wrote: > When I awoke this morning I understood why you might suggest this. It > would, supposedly, make it possible to instantiate multiple instances of > the LeoApp class. I have just created #1537 >

Re: Some excellent pytest articles/presentations

2020-03-16 Thread Edward K. Ream
On Mon, Mar 16, 2020 at 9:06 AM Thomas Passin wrote: > > > On Monday, March 16, 2020 at 6:23:50 AM UTC-4, Edward K. Ream wrote: > >> >> As noted in the issue, it's not clear whether changing `g.app` to `self` >> in the LeoApp class would make any real difference. It might well mislead >> people.

Re: Some excellent pytest articles/presentations

2020-03-16 Thread Thomas Passin
On Monday, March 16, 2020 at 6:23:50 AM UTC-4, Edward K. Ream wrote: > > As noted in the issue, it's not clear whether changing `g.app` to `self` > in the LeoApp class would make any real difference. It might well mislead > people. > I always thought that you had used this kind of idiom as a

Re: Some excellent pytest articles/presentations

2020-03-16 Thread Edward K. Ream
On Sunday, March 15, 2020 at 3:41:09 PM UTC-5, Edward K. Ream wrote: On Sun, Mar 15, 2020 at 1:29 PM Brian Theado wrote: > > What do you think about the following specific suggestion? >> >> Change all 'g.app' references in the methods of the LeoApp class to >> 'self'. Or add 'app = self' to the m

Re: Some excellent pytest articles/presentations

2020-03-15 Thread Edward K. Ream
On Sun, Mar 15, 2020 at 1:29 PM Brian Theado wrote: What do you think about the following specific suggestion? > > Change all 'g.app' references in the methods of the LeoApp class to > 'self'. Or add 'app = self' to the method and change 'g.app' to 'app'. > > Sure, it's possible. This is a patter

Re: Some excellent pytest articles/presentations

2020-03-15 Thread Brian Theado
Edward, On Sun, Mar 15, 2020 at 11:38 AM Edward K. Ream wrote: > > the history of re-implementations contains a lot of sad failures. It's > just too big a job, the new implementations have their own bugs, and by the > time they get done, the original version has developed beyond that the new >

Re: Some excellent pytest articles/presentations

2020-03-15 Thread Edward K. Ream
On Sun, Mar 15, 2020 at 9:46 AM Thomas Passin wrote: > the history of re-implementations contains a lot of sad failures. It's just too big a job, the new implementations have their own bugs, and by the time they get done, the original version has developed beyond that the new one has implemented

Re: Some excellent pytest articles/presentations

2020-03-15 Thread Thomas Passin
On Sunday, March 15, 2020 at 6:39:46 AM UTC-4, Edward K. Ream wrote: > > On Sat, Mar 14, 2020 at 9:12 AM vitalije > > wrote: > > I really believe that doing decoupling piece by piece, module by module, >> can make Leo's code much easier to test and more importantly easier to >> (re)use. >> > >

Re: Some excellent pytest articles/presentations

2020-03-15 Thread Edward K. Ream
On Sat, Mar 14, 2020 at 9:12 AM vitalije wrote: The way to achieve this is straightforward but it requires some effort. The > coupled modules should be decoupled as much as possible. From the current > state it is not obvious how decoupling can be achieved, but the decoupling > process must start

Re: Some excellent pytest articles/presentations

2020-03-14 Thread Thomas Passin
On Saturday, March 14, 2020 at 10:12:06 AM UTC-4, vitalije wrote: > > That does not mean that testing that code will ever be easy. If anyone >> knows how to test the Qt code, I would appreciate knowing how. > > [snip] > I really believe that doing decoupling piece by piece, module by module, > c

Re: Some excellent pytest articles/presentations

2020-03-14 Thread vitalije
> > That does not mean that testing that code will ever be easy. If anyone > knows how to test the Qt code, I would appreciate knowing how. > Edward > No, it never will be easy, but it can be made easier than it is now. The way to achieve this is straightforward but it requires some effort. T

Re: Some excellent pytest articles/presentations

2020-03-14 Thread Thomas Passin
On Saturday, March 14, 2020 at 9:39:15 AM UTC-4, Thomas Passin wrote: > > On Saturday, March 14, 2020 at 7:33:28 AM UTC-4, Edward K. Ream wrote: >> >> >> Otoh, Leo's Qt dock code depends on complex state set on program startup >> and shutdown, as well as arbitrary *sequences* of user actions. I

Re: Some excellent pytest articles/presentations

2020-03-14 Thread Thomas Passin
On Saturday, March 14, 2020 at 7:33:28 AM UTC-4, Edward K. Ream wrote: > > > Otoh, Leo's Qt dock code depends on complex state set on program startup > and shutdown, as well as arbitrary *sequences* of user actions. I agree > that the code is hard to test and hard to use. That does not mean that

Re: Some excellent pytest articles/presentations

2020-03-14 Thread Edward K. Ream
On Fri, Mar 13, 2020 at 8:39 PM Brian Theado wrote: I came across these articles about pytest recently and thought they might > be of interest to other developers here. > > https://nedbatchelder.com/text/test3.html > Thanks for the link. I'll take a close look. ...one quote I liked: > > "The kin

Some excellent pytest articles/presentations

2020-03-13 Thread Brian Theado
I came across these articles about pytest recently and thought they might be of interest to other developers here. These slides start basic, but cover a lot of ground and I learned a lot: https://nedbatchelder.com/text/test3.html Not the main thrust of the presentation, but one quote I liked: "T