On Thu, Aug 24, 2017 at 08:21:59AM +0100, Stefan Hajnoczi wrote:
> This series introduces context managers for the two most commonly used
> resources: files and VMs. Context managers eliminate the need to call a
> cleanup function explicitly.
>
> Tests should declare resources upfront in a with
On Wed, 08/30 13:44, Stefan Hajnoczi wrote:
> On Fri, Aug 25, 2017 at 05:29:14PM +0800, Fam Zheng wrote:
> > On Fri, 08/25 09:52, Stefan Hajnoczi wrote:
> > > On Fri, Aug 25, 2017 at 03:32:29PM +0800, Fam Zheng wrote:
> > > > On Thu, 08/24 19:04, Stefan Hajnoczi wrote:
> > > > > On Thu, Aug 24,
On Fri, Aug 25, 2017 at 05:29:14PM +0800, Fam Zheng wrote:
> On Fri, 08/25 09:52, Stefan Hajnoczi wrote:
> > On Fri, Aug 25, 2017 at 03:32:29PM +0800, Fam Zheng wrote:
> > > On Thu, 08/24 19:04, Stefan Hajnoczi wrote:
> > > > On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote:
> > > > > On
Stefan Hajnoczi writes:
> On Fri, Aug 25, 2017 at 03:32:29PM +0800, Fam Zheng wrote:
>> On Thu, 08/24 19:04, Stefan Hajnoczi wrote:
>> > On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote:
>> > > On Thu, 08/24 08:21, Stefan Hajnoczi wrote:
>> > > > Tests should
On Fri, 08/25 09:52, Stefan Hajnoczi wrote:
> On Fri, Aug 25, 2017 at 03:32:29PM +0800, Fam Zheng wrote:
> > On Thu, 08/24 19:04, Stefan Hajnoczi wrote:
> > > On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote:
> > > > On Thu, 08/24 08:21, Stefan Hajnoczi wrote:
> > > > > Tests should
On Fri, Aug 25, 2017 at 03:32:29PM +0800, Fam Zheng wrote:
> On Thu, 08/24 19:04, Stefan Hajnoczi wrote:
> > On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote:
> > > On Thu, 08/24 08:21, Stefan Hajnoczi wrote:
> > > > Tests should declare resources upfront in a with statement. Resources
On Thu, 08/24 19:04, Stefan Hajnoczi wrote:
> On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote:
> > On Thu, 08/24 08:21, Stefan Hajnoczi wrote:
> > > Tests should declare resources upfront in a with statement. Resources are
> > > automatically cleaned up whether the test passes or fails:
On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote:
> On Thu, 08/24 08:21, Stefan Hajnoczi wrote:
> > Tests should declare resources upfront in a with statement. Resources are
> > automatically cleaned up whether the test passes or fails:
> >
> > with FilePath('test.img') as img_path,
>
On Thu, 08/24 08:21, Stefan Hajnoczi wrote:
> Tests should declare resources upfront in a with statement. Resources are
> automatically cleaned up whether the test passes or fails:
>
> with FilePath('test.img') as img_path,
>VM() as vm:
> ...test...
> # img_path is deleted and
This series introduces context managers for the two most commonly used
resources: files and VMs. Context managers eliminate the need to call a
cleanup function explicitly.
Tests should declare resources upfront in a with statement. Resources are
automatically cleaned up whether the test passes
10 matches
Mail list logo