From cito at online.de Fri Apr 3 14:25:06 2020 From: cito at online.de (Christoph Zwerschke) Date: Fri, 3 Apr 2020 20:25:06 +0200 Subject: [pytest-dev] New home and maintainer for pytest-describe? Message-ID: <29fa2c20-6947-9ad8-2a3f-3437b4b1f64b@online.de> The author of pytest-describe, a pytest plugin for Jasmine-style nesting of test functions, is currently looking for a new maintainer. jacebrowning and I already volunteered. If anybody else is interested in maintaining that project, please let us know. Als, we would like to move the plugin repository (currently at https://github.com/ropez/pytest-describe) to the pytest-dev organization (https://github.com/pytest-dev). Who would be a good contact person in the pytest-dev organization to help with such a transfer? see also https://github.com/ropez/pytest-describe/issues/26 -- Christoph From flub at devork.be Sun Apr 5 08:38:31 2020 From: flub at devork.be (Floris Bruynooghe) Date: Sun, 05 Apr 2020 14:38:31 +0200 Subject: [pytest-dev] New home and maintainer for pytest-describe? In-Reply-To: <29fa2c20-6947-9ad8-2a3f-3437b4b1f64b@online.de> References: <29fa2c20-6947-9ad8-2a3f-3437b4b1f64b@online.de> Message-ID: <87v9meds54.fsf@powell.devork.be> Hi Christoph, On Fri 03 Apr 2020 at 20:25 +0200, Christoph Zwerschke wrote: > The author of pytest-describe, a pytest plugin for Jasmine-style nesting > of test functions, is currently looking for a new maintainer. > > jacebrowning and I already volunteered. If anybody else is interested in > maintaining that project, please let us know. Thanks for stepping up to maintain a pytest plugin! > Als, we would like to move the plugin repository (currently at > https://github.com/ropez/pytest-describe) to the pytest-dev organization > (https://github.com/pytest-dev). Who would be a good contact person in > the pytest-dev organization to help with such a transfer? Sure, I had a look at it seems like you tick all the boxes from https://github.com/pytest-dev/pytest/blob/master/CONTRIBUTING.rst#submitting-plugins-to-pytest-dev to transfer the repo. Just make sure both of you have the required pypi.org admin rights for the package. So from me that's a +1 to move it. We just need another +1 from someone. If we get that I'm happy to do the transferring as detailed in the link above. Just ping me when it gets to that stage. Cheers, Floris From flub at devork.be Sun Apr 5 09:12:52 2020 From: flub at devork.be (Floris Bruynooghe) Date: Sun, 05 Apr 2020 15:12:52 +0200 Subject: [pytest-dev] junitxml incremental output writing Message-ID: <87sghidqjv.fsf@powell.devork.be> Hello all, One of the most common things users of pytest-timeout struggle with is that they lose Junit XML reporting when a timeout occurs. This never bothered me, it was by design, but that doesn't stop users from being bothered. Which made me wonder, does anyone know if there's a reason that the Junit XML reporting can't write it's report incrementally as each test executed? Not sure that would work well with xdist though. An additional thing or alternative would be if there's a hook that we could use from plugins to say "finish reporting now". So e.g. pytest-timeout could report a failure for the test which timed out, call this hook and only then terminate the process. I'm only bouncing around ill-thought through ideas around this to see what other people think. Cheers, Floris From nicoddemus at gmail.com Sun Apr 5 10:09:26 2020 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Sun, 5 Apr 2020 11:09:26 -0300 Subject: [pytest-dev] New home and maintainer for pytest-describe? In-Reply-To: <87v9meds54.fsf@powell.devork.be> References: <29fa2c20-6947-9ad8-2a3f-3437b4b1f64b@online.de> <87v9meds54.fsf@powell.devork.be> Message-ID: +1 as well :) On Sun, Apr 5, 2020 at 9:38 AM Floris Bruynooghe wrote: > Hi Christoph, > > On Fri 03 Apr 2020 at 20:25 +0200, Christoph Zwerschke wrote: > > > The author of pytest-describe, a pytest plugin for Jasmine-style nesting > > of test functions, is currently looking for a new maintainer. > > > > jacebrowning and I already volunteered. If anybody else is interested in > > maintaining that project, please let us know. > > Thanks for stepping up to maintain a pytest plugin! > > > Als, we would like to move the plugin repository (currently at > > https://github.com/ropez/pytest-describe) to the pytest-dev > organization > > (https://github.com/pytest-dev). Who would be a good contact person in > > the pytest-dev organization to help with such a transfer? > > Sure, I had a look at it seems like you tick all the boxes from > > https://github.com/pytest-dev/pytest/blob/master/CONTRIBUTING.rst#submitting-plugins-to-pytest-dev > to transfer the repo. Just make sure both of you have the required > pypi.org admin rights for the package. > > So from me that's a +1 to move it. We just need another +1 from > someone. > > If we get that I'm happy to do the transferring as detailed in the link > above. Just ping me when it gets to that stage. > > Cheers, > Floris > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cito at online.de Sun Apr 5 11:36:00 2020 From: cito at online.de (Christoph Zwerschke) Date: Sun, 5 Apr 2020 17:36:00 +0200 Subject: [pytest-dev] New home and maintainer for pytest-describe? In-Reply-To: References: <29fa2c20-6947-9ad8-2a3f-3437b4b1f64b@online.de> <87v9meds54.fsf@powell.devork.be> Message-ID: <3037a9a3-82f7-aa43-da80-152a59126a4a@online.de> Thank you Floris and Bruno. I have now created this issue to track the transfer: https://github.com/ropez/pytest-describe/issues/30 -- Christoph Am 05.04.2020 um 16:09 schrieb Bruno Oliveira: > +1 as well :) > > On Sun, Apr 5, 2020 at 9:38 AM Floris Bruynooghe > wrote: > > Hi Christoph, > > On Fri 03 Apr 2020 at 20:25 +0200, Christoph Zwerschke wrote: > > > The author of pytest-describe, a pytest plugin for Jasmine-style > nesting > > of test functions, is currently looking for a new maintainer. > > > > jacebrowning and I already volunteered. If anybody else is > interested in > > maintaining that project, please let us know. > > Thanks for stepping up to maintain a pytest plugin! > > > Als, we would like to move the plugin repository (currently at > > https://github.com/ropez/pytest-describe) to the pytest-dev > organization > > (https://github.com/pytest-dev). Who would be a good contact > person in > > the pytest-dev organization to help with such a transfer? > > Sure, I had a look at it seems like you tick all the boxes from > https://github.com/pytest-dev/pytest/blob/master/CONTRIBUTING.rst#submitting-plugins-to-pytest-dev > to transfer the repo.? Just make sure both of you have the required > pypi.org admin rights for the package. > > So from me that's a +1 to move it.? We just need another +1 from > someone. > > If we get that I'm happy to do the transferring as detailed in the link > above.? Just ping me when it gets to that stage. > > Cheers, > Floris > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From opensource at ronnypfannschmidt.de Mon Apr 6 03:24:34 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Mon, 6 Apr 2020 09:24:34 +0200 Subject: [pytest-dev] junitxml incremental output writing In-Reply-To: <87sghidqjv.fsf@powell.devork.be> References: <87sghidqjv.fsf@powell.devork.be> Message-ID: **re-sent with correct sender mail** Hi Floris, an incremental writer has to continuously update either the pre-overstretched xml header of the report or continuously rewrite the file at once. An implementation would be tricky and need someone to dedicate to it to weed out the detail ussues that will invariably crop up. Another approach could be to just write the xml report parts of each item into a junitxml.parts file and at the end of the test to just recombine the file with the enclosing xml element. I think people that care about it should come up with it. -- Ronny Am 05.04.20 um 15:12 schrieb Floris Bruynooghe: > Hello all, > > One of the most common things users of pytest-timeout struggle with is > that they lose Junit XML reporting when a timeout occurs. This never > bothered me, it was by design, but that doesn't stop users from being > bothered. > > Which made me wonder, does anyone know if there's a reason that the > Junit XML reporting can't write it's report incrementally as each test > executed? Not sure that would work well with xdist though. > > An additional thing or alternative would be if there's a hook that we > could use from plugins to say "finish reporting now". So > e.g. pytest-timeout could report a failure for the test which timed out, > call this hook and only then terminate the process. > > > I'm only bouncing around ill-thought through ideas around this to see > what other people think. > > Cheers, > Floris > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From flub at devork.be Mon Apr 6 15:45:24 2020 From: flub at devork.be (Floris Bruynooghe) Date: Mon, 06 Apr 2020 21:45:24 +0200 Subject: [pytest-dev] junitxml incremental output writing In-Reply-To: References: <87sghidqjv.fsf@powell.devork.be> Message-ID: <87mu7oe6uj.fsf@powell.devork.be> Hey Ronny, On Mon 06 Apr 2020 at 09:24 +0200, Ronny Pfannschmidt wrote: > an incremental writer has to continuously update either the > pre-overstretched xml header of the report or continuously rewrite the > file at once. Cool. Thanks for putting this so succinctly! > Another approach could be to just write the xml report parts of each > item into a junitxml.parts file and > at the end of the test to just recombine the file with the enclosing xml > element. This is possibly an interesting approach. I think CI can usually already combine many reports into one so the simplest implementation could be to write one report per test and not even bother with recombining. > I think people that care about it should come up with it. Here I agree entirely. I'm only curious to explore the general ideas a bit so I know what to tell people to work on when they ask about this. No one feel like critiquing the idea of providing an API to plugins that can be used to trigger reports to be (re)written right now? Cheers, Floris From opensource at ronnypfannschmidt.de Tue Apr 7 00:46:52 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Tue, 7 Apr 2020 06:46:52 +0200 Subject: [pytest-dev] junitxml incremental output writing In-Reply-To: <87mu7oe6uj.fsf@powell.devork.be> References: <87sghidqjv.fsf@powell.devork.be> <87mu7oe6uj.fsf@powell.devork.be> Message-ID: <2e762216-4d4b-d3b9-2ac5-d596a47a6eae@ronnypfannschmidt.de> Hi Floris, this morning i remebered another idea. instead of creating the junitxml report direcly, one could use the new reportlog plugin, and add report replay to it, thus collecting the report logs on the first run, then combiningthe pytest reports to junitxml on the second run. -- Ronny Am 06.04.20 um 21:45 schrieb Floris Bruynooghe: > Hey Ronny, > > On Mon 06 Apr 2020 at 09:24 +0200, Ronny Pfannschmidt wrote: >> an incremental writer has to continuously update either the >> pre-overstretched xml header of the report or continuously rewrite the >> file at once. > Cool. Thanks for putting this so succinctly! > >> Another approach could be to just write the xml report parts of each >> item into a junitxml.parts file and >> at the end of the test to just recombine the file with the enclosing xml >> element. > This is possibly an interesting approach. I think CI can usually > already combine many reports into one so the simplest implementation > could be to write one report per test and not even bother with > recombining. > >> I think people that care about it should come up with it. > Here I agree entirely. I'm only curious to explore the general ideas a > bit so I know what to tell people to work on when they ask about this. > > > No one feel like critiquing the idea of providing an API to plugins that > can be used to trigger reports to be (re)written right now? > > > Cheers, > Floris From obeythetestinggoat at gmail.com Tue Apr 7 14:26:53 2020 From: obeythetestinggoat at gmail.com (Harry Percival) Date: Tue, 7 Apr 2020 19:26:53 +0100 Subject: [pytest-dev] What's the best way of writing tests for terminal width resize behaviour in an assertrepr plugin? In-Reply-To: References: Message-ID: cf discussion here https://github.com/pytest-dev/pytest/issues/162 I'm working on pytest-icdiff, trying to get it to print out well optimised messages for different terminal sizes, and it's hard. when i'm running tests using runpytest, and I _think_ in real life too, config.get_terminal_writer().fullwidth *inside the hook* is returning incorrect values: resizing the terminal i'm using to run the tests has no effect on the value i get from it. and when I use that value irl, real test output does not adjust correctly to the terminal size but calling py.io.TerminalWriter().fullwidth _outside_ the hook, eg at module level, _does_ give me readings that look right. but testing that is hard. intriguingly, if I do testdir.monkeypatch.setenv('COLUMNS', '50'), then the fullwdith *inside* the hook varies. but that's no use to me, since IRL that value doesn't work. so my question is: a) does anyone know of any good examples of assertrepr plugins that adjust dynamically to terminal width, and b) what's a good way of writing tests for that? here's the repo fwiw https://github.com/hjwp/pytest-icdiff/blob/master/tests/test_pytest_icdiff.py -------------- next part -------------- An HTML attachment was scrubbed... URL: From flub at devork.be Wed Apr 8 14:48:11 2020 From: flub at devork.be (Floris Bruynooghe) Date: Wed, 08 Apr 2020 20:48:11 +0200 Subject: [pytest-dev] junitxml incremental output writing In-Reply-To: <2e762216-4d4b-d3b9-2ac5-d596a47a6eae@ronnypfannschmidt.de> References: <87sghidqjv.fsf@powell.devork.be> <87mu7oe6uj.fsf@powell.devork.be> <2e762216-4d4b-d3b9-2ac5-d596a47a6eae@ronnypfannschmidt.de> Message-ID: <874ktterv8.fsf@powell.devork.be> On Tue 07 Apr 2020 at 06:46 +0200, Ronny Pfannschmidt wrote: > instead of creating the junitxml report direcly, > one could use the new reportlog plugin, and add report replay to it, > thus collecting the report logs on the first run, then combiningthe > pytest reports to junitxml on the second run. That is also an interesting approach to this. thanks! From flub at devork.be Wed Apr 8 16:55:37 2020 From: flub at devork.be (Floris Bruynooghe) Date: Wed, 08 Apr 2020 22:55:37 +0200 Subject: [pytest-dev] What's the best way of writing tests for terminal width resize behaviour in an assertrepr plugin? In-Reply-To: References: Message-ID: <87v9m9d7ee.fsf@powell.devork.be> Hi Harry, To the best of my knowledge you stumbled into a hard and dark corner of pytest. IIRC previous attempts at improving this have not gone too well. But like this always goes, it sounds like you've set yourself up to be the expert now and are in a great position to clean this up and make it work nicely for people. ;) Cheers, Floris On Tue 07 Apr 2020 at 19:26 +0100, Harry Percival wrote: > cf discussion here https://github.com/pytest-dev/pytest/issues/162 > > I'm working on pytest-icdiff, trying to get it to print out well optimised > messages for different terminal sizes, and it's hard. > > when i'm running tests using runpytest, and I _think_ in real life too, > config.get_terminal_writer().fullwidth *inside the hook* is returning > incorrect values: resizing the terminal i'm using to run the tests has no > effect on the value i get from it. and when I use that value irl, real > test output does not adjust correctly to the terminal size > > but calling py.io.TerminalWriter().fullwidth _outside_ the hook, eg at > module level, _does_ give me readings that look right. but testing that > is hard. > > intriguingly, if I do testdir.monkeypatch.setenv('COLUMNS', '50'), then the > fullwdith *inside* the hook varies. but that's no use to me, since IRL > that value doesn't work. > > so my question is: a) does anyone know of any good examples of assertrepr > plugins that adjust dynamically to terminal width, and b) what's a good way > of writing tests for that? > > here's the repo fwiw > https://github.com/hjwp/pytest-icdiff/blob/master/tests/test_pytest_icdiff.py > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From they4kman at gmail.com Wed Apr 8 23:48:20 2020 From: they4kman at gmail.com (Zach Kanzler) Date: Wed, 8 Apr 2020 23:48:20 -0400 Subject: [pytest-dev] What's the best way of writing tests for terminal width resize behaviour in an assertrepr plugin? In-Reply-To: <87v9m9d7ee.fsf@powell.devork.be> References: <87v9m9d7ee.fsf@powell.devork.be> Message-ID: I wrote an icdiff-based pretty diffs pytest plugin for internal use, and ran into the same issue. I ended up grabbing the terminal width at module-level, as well. I think I went spelunking in the GH issues and found a glimmer of possibility in the notion that get_terminal_width() returns incorrect information from within the assertrepr hook, because it's called when terminal capturing is enabled ? perhaps even just a wrapped stream? Here's the note I left myself: # This is done during initialization, before any tests are run, instead of # within our assertrepr hook ? because the assertrepr hook is called while # terminal capturing is enabled and all calls to get_terminal_width() return 80 # ref: https://github.com/pytest-dev/pytest/issues/4030#issuecomment-425672782 INITIAL_TERM_WIDTH, INITIAL_TERM_HEIGHT = util.get_terminal_size() (Where util.get_terminal_size() just comes from this gist ) I wonder if a tool like screen or tmux could supply real sizing info and resize events, while also appearing like an unwrapped stream ? and perhaps its output could be saved & compared against. Cheers, Zach On Wed, Apr 8, 2020 at 4:55 PM Floris Bruynooghe wrote: > Hi Harry, > > To the best of my knowledge you stumbled into a hard and dark corner of > pytest. IIRC previous attempts at improving this have not gone too > well. But like this always goes, it sounds like you've set yourself up > to be the expert now and are in a great position to clean this up and > make it work nicely for people. ;) > > Cheers, > Floris > > On Tue 07 Apr 2020 at 19:26 +0100, Harry Percival wrote: > > > cf discussion here https://github.com/pytest-dev/pytest/issues/162 > > > > I'm working on pytest-icdiff, trying to get it to print out well > optimised > > messages for different terminal sizes, and it's hard. > > > > when i'm running tests using runpytest, and I _think_ in real life too, > > config.get_terminal_writer().fullwidth *inside the hook* is returning > > incorrect values: resizing the terminal i'm using to run the tests has no > > effect on the value i get from it. and when I use that value irl, real > > test output does not adjust correctly to the terminal size > > > > but calling py.io.TerminalWriter().fullwidth _outside_ the hook, eg at > > module level, _does_ give me readings that look right. but testing that > > is hard. > > > > intriguingly, if I do testdir.monkeypatch.setenv('COLUMNS', '50'), then > the > > fullwdith *inside* the hook varies. but that's no use to me, since IRL > > that value doesn't work. > > > > so my question is: a) does anyone know of any good examples of assertrepr > > plugins that adjust dynamically to terminal width, and b) what's a good > way > > of writing tests for that? > > > > here's the repo fwiw > > > https://github.com/hjwp/pytest-icdiff/blob/master/tests/test_pytest_icdiff.py > > _______________________________________________ > > pytest-dev mailing list > > pytest-dev at python.org > > https://mail.python.org/mailman/listinfo/pytest-dev > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From obeythetestinggoat at gmail.com Thu Apr 9 04:40:23 2020 From: obeythetestinggoat at gmail.com (Harry Percival) Date: Thu, 9 Apr 2020 09:40:23 +0100 Subject: [pytest-dev] What's the best way of writing tests for terminal width resize behaviour in an assertrepr plugin? In-Reply-To: References: <87v9m9d7ee.fsf@powell.devork.be> Message-ID: Floris, that's exactly the answer I was most afraid of. oh no. Zach, great minds! any thoughts on what i've done so far in my plugin, things i've missed, things i could add? https://github.com/hjwp/pytest-icdiff On Thu, 9 Apr 2020 at 04:48, Zach Kanzler wrote: > I wrote an icdiff-based pretty diffs pytest plugin for internal use, and > ran into the same issue. I ended up grabbing the terminal width at > module-level, as well. I think I went spelunking in the GH issues and found > a glimmer of possibility in the notion that get_terminal_width() returns > incorrect information from within the assertrepr hook, because it's > called when terminal capturing is enabled ? perhaps even just a wrapped > stream? > > Here's the note I left myself: > > # This is done during initialization, before any tests are run, instead of > # within our assertrepr hook ? because the assertrepr hook is called while > # terminal capturing is enabled and all calls to get_terminal_width() > return 80 > # ref: > https://github.com/pytest-dev/pytest/issues/4030#issuecomment-425672782 > INITIAL_TERM_WIDTH, INITIAL_TERM_HEIGHT = util.get_terminal_size() > > > (Where util.get_terminal_size() just comes from this gist > ) > > I wonder if a tool like screen or tmux could supply real sizing info and > resize events, while also appearing like an unwrapped stream ? and perhaps > its output could be saved & compared against. > > Cheers, > Zach > > On Wed, Apr 8, 2020 at 4:55 PM Floris Bruynooghe wrote: > >> Hi Harry, >> >> To the best of my knowledge you stumbled into a hard and dark corner of >> pytest. IIRC previous attempts at improving this have not gone too >> well. But like this always goes, it sounds like you've set yourself up >> to be the expert now and are in a great position to clean this up and >> make it work nicely for people. ;) >> >> Cheers, >> Floris >> >> On Tue 07 Apr 2020 at 19:26 +0100, Harry Percival wrote: >> >> > cf discussion here https://github.com/pytest-dev/pytest/issues/162 >> > >> > I'm working on pytest-icdiff, trying to get it to print out well >> optimised >> > messages for different terminal sizes, and it's hard. >> > >> > when i'm running tests using runpytest, and I _think_ in real life too, >> > config.get_terminal_writer().fullwidth *inside the hook* is returning >> > incorrect values: resizing the terminal i'm using to run the tests has >> no >> > effect on the value i get from it. and when I use that value irl, real >> > test output does not adjust correctly to the terminal size >> > >> > but calling py.io.TerminalWriter().fullwidth _outside_ the hook, eg at >> > module level, _does_ give me readings that look right. but testing >> that >> > is hard. >> > >> > intriguingly, if I do testdir.monkeypatch.setenv('COLUMNS', '50'), then >> the >> > fullwdith *inside* the hook varies. but that's no use to me, since IRL >> > that value doesn't work. >> > >> > so my question is: a) does anyone know of any good examples of >> assertrepr >> > plugins that adjust dynamically to terminal width, and b) what's a good >> way >> > of writing tests for that? >> > >> > here's the repo fwiw >> > >> https://github.com/hjwp/pytest-icdiff/blob/master/tests/test_pytest_icdiff.py >> > _______________________________________________ >> > pytest-dev mailing list >> > pytest-dev at python.org >> > https://mail.python.org/mailman/listinfo/pytest-dev >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Fri Apr 10 09:46:04 2020 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Fri, 10 Apr 2020 10:46:04 -0300 Subject: [pytest-dev] Leaving pytest for now Message-ID: Hi everyone, For the past years I've been part of pytest, which is an awesome library and also a community with awesome people. It definitely made me a better person and better programmer. However, the past months or so one individual has drained my will to work on the project because of his interactions, so I decided it is best that I leave the project for a while and focus on other things. I of course wish the project and everyone involved the best, and will definitely continue to work on my numerous plugins meanwhile. Stay safe, and cheers! Bruno -------------- next part -------------- An HTML attachment was scrubbed... URL: From asottile+pytest at umich.edu Fri Apr 10 12:51:43 2020 From: asottile+pytest at umich.edu (Anthony Sottile) Date: Fri, 10 Apr 2020 09:51:43 -0700 Subject: [pytest-dev] Also leaving pytest-dev for now Message-ID: Hello friends, Also echoing the concerns of Bruno I'll be stepping down from my role as core developer on pytest. I love working on the project but cannot continue to do so when working with a particular individual has been extremely draining. I, in good faith, cannot continue to represent a project which enables this individual's behaviour towards other contributors and users. So until further notice, I'll be taking leave from the project. Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From opensource at ronnypfannschmidt.de Fri Apr 10 17:05:18 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Fri, 10 Apr 2020 23:05:18 +0200 Subject: [pytest-dev] also leaving pytest-dev for now Message-ID: Hi everyone, after contemplaing a while i decided to join Bruno and Anthony. When i returned from my hiatus i declared that joy will be important, currently that joy is absent. -- Ronny From andyfaff at gmail.com Sat Apr 11 00:23:27 2020 From: andyfaff at gmail.com (Andrew Nelson) Date: Sat, 11 Apr 2020 14:23:27 +1000 Subject: [pytest-dev] multiprocessing tests hang on Python3.8+macOS Message-ID: Dear pytest-dev, on scipy we typically run the test suite using a test script collecting a series of test arguments, then supplies them to `pytest.main()`. https://github.com/scipy/scipy/blob/master/runtests.py#L307 then https://github.com/scipy/scipy/blob/master/scipy/_lib/_testutils.py#L67 I'm finding that all the tests that involve multiprocessing fail, e.g. ``` def test_pool(): with Pool(2) as p: p.map(math.sin, [1,2,3, 4]) ``` This is on macOS+Python3.8 that uses 'spawn' as a start method. If I run the tests directly using pytest there aren't any issues. Are there any known issues using `pytest.main` with multiprocessing? Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyfaff at gmail.com Sat Apr 11 00:53:09 2020 From: andyfaff at gmail.com (Andrew Nelson) Date: Sat, 11 Apr 2020 14:53:09 +1000 Subject: [pytest-dev] multiprocessing tests hang on Python3.8+macOS In-Reply-To: References: Message-ID: A gist showing the test hanging is here: https://gist.github.com/andyfaff/a5bb1cbcc1828edde0bc7c1f67666f1c Note that if the Pool start method is set to 'fork' (non default on macOS and not recommended) then the test runs without any issues. On Sat, 11 Apr 2020 at 14:23, Andrew Nelson wrote: > Dear pytest-dev, > on scipy we typically run the test suite using a test script collecting a > series of test arguments, then supplies them to `pytest.main()`. > > https://github.com/scipy/scipy/blob/master/runtests.py#L307 > then > https://github.com/scipy/scipy/blob/master/scipy/_lib/_testutils.py#L67 > > I'm finding that all the tests that involve multiprocessing fail, e.g. > > ``` > def test_pool(): > with Pool(2) as p: > p.map(math.sin, [1,2,3, 4]) > ``` > > This is on macOS+Python3.8 that uses 'spawn' as a start method. If I run > the tests directly using pytest there aren't any issues. > Are there any known issues using `pytest.main` with multiprocessing? > > Andrew > -- _____________________________________ Dr. Andrew Nelson _____________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gherman at darwin.in-berlin.de Sat Apr 11 04:46:42 2020 From: gherman at darwin.in-berlin.de (Dinu Gherman) Date: Sat, 11 Apr 2020 10:46:42 +0200 Subject: [pytest-dev] also leaving pytest-dev for now In-Reply-To: References: Message-ID: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> This makes me very sad for all three of you who leave), and I don?t understand why in the ?discussion? so far at least on twitter everybody tries to be ?politically correct? and not discuss the cause of this issue. To me it seems like the CoCs that so many were proud of having do not work as intended. And for our community it would be better to handle such ?issues? in the same ?open? way that we are proud of doing when working on ?open source?. We have too many bastards ruining the world already. Best, Dinu > On 10. Apr 2020, at 23:05, Ronny Pfannschmidt wrote: > > Hi everyone, > > > after contemplaing a while i decided to join Bruno and Anthony. > When i returned from my hiatus i declared that joy will be important, > > currently that joy is absent. > > > -- Ronny > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From brianna.laugher at gmail.com Sat Apr 11 07:19:55 2020 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Sat, 11 Apr 2020 21:19:55 +1000 Subject: [pytest-dev] Code of conduct issues Message-ID: Hi all, As one of the Code of Conduct (CoC) committee members ( https://github.com/pytest-dev/pytest/blob/master/CODE_OF_CONDUCT.md ) I want to apologise for the poor handling of issues that have led Bruno, Anthony and Ronny to step back from the project. As a group we failed to act decisively and now people who have contributed so much to pytest are suffering, and for that I am sorry. I intend to reach out to the PSF Conduct Working Group and ask them to advise us on a way forward. thanks, Brianna -------------- next part -------------- An HTML attachment was scrubbed... URL: From opensource at ronnypfannschmidt.de Sat Apr 11 11:30:52 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Sat, 11 Apr 2020 17:30:52 +0200 Subject: [pytest-dev] also leaving pytest-dev for now In-Reply-To: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> References: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> Message-ID: Hi Dinu, i can understand your anger and sadness. I left the CoC team over the handling of this. Now that i removed myself from the Situation and the Position of Responsibility i am free to resolve the Fallout as i want. I believe i can speak for all 3 of us when i say that we don't want to obtain "justice" and "Resolution" by a angry mob. I for myself will go an enjoy easter with my family and will sort out the rest once i have my mind and feelings settled. I appreciate you get angry for us, because it shows you care, i wish you a positive outlet for that, from own experience i know that part can be tricky. -- Ronny Am 11.04.20 um 10:46 schrieb Dinu Gherman: > This makes me very sad for all three of you who leave), and I don?t understand why in the ?discussion? so far at least on twitter everybody tries to be ?politically correct? and not discuss the cause of this issue. To me it seems like the CoCs that so many were proud of having do not work as intended. And for our community it would be better to handle such ?issues? in the same ?open? way that we are proud of doing when working on ?open source?. We have too many bastards ruining the world already. > > Best, > > Dinu > > >> On 10. Apr 2020, at 23:05, Ronny Pfannschmidt wrote: >> >> Hi everyone, >> >> >> after contemplaing a while i decided to join Bruno and Anthony. >> When i returned from my hiatus i declared that joy will be important, >> >> currently that joy is absent. >> >> >> -- Ronny >> >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev From grizz at 20c.com Sat Apr 11 16:47:20 2020 From: grizz at 20c.com (Matt Griswold) Date: Sat, 11 Apr 2020 20:47:20 +0000 Subject: [pytest-dev] also leaving pytest-dev for now In-Reply-To: References: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> Message-ID: <20200411204720.569bd5e2@segv> Is there a thread somewhere to see what's going on for those of us who rarely twitter? Sorry to see everyone go -- but yes, enjoy your Easter! :) * Ronny Pfannschmidt [200411 17:30 +0200]: > Hi Dinu, > > i can understand your anger and sadness. > I left the CoC team over the handling of this. > Now that i removed myself from the Situation > and the Position of Responsibility i am free to resolve the Fallout > as i want. > > I believe i can speak for all 3 of us when i say that we don't want > to obtain "justice" and "Resolution" by a angry mob. > > I for myself will go an enjoy easter with my family and > will sort out the rest once i have my mind and feelings settled. > > I appreciate you get angry for us, because it shows you care, > i wish you a positive outlet for that, from own experience > i know that part can be tricky. > > -- Ronny > > Am 11.04.20 um 10:46 schrieb Dinu Gherman: > > > This makes me very sad for all three of you who leave), and I don?t > > understand why in the ?discussion? so far at least on twitter > > everybody tries to be ?politically correct? and not discuss the > > cause of this issue. To me it seems like the CoCs that so many > > were proud of having do not work as intended. And for our > > community it would be better to handle such ?issues? in the same > > ?open? way that we are proud of doing when working on ?open > > source?. We have too many bastards ruining the world already. > > > > Best, > > > > Dinu > > > > > >> On 10. Apr 2020, at 23:05, Ronny Pfannschmidt > >> wrote: > >> > >> Hi everyone, > >> > >> > >> after contemplaing a while i decided to join Bruno and Anthony. > >> When i returned from my hiatus i declared that joy will be > >> important, > >> > >> currently that joy is absent. > >> > >> > >> -- Ronny > >> > >> _______________________________________________ > >> pytest-dev mailing list > >> pytest-dev at python.org > >> https://mail.python.org/mailman/listinfo/pytest-dev > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From lenikmutungi at gmail.com Sun Apr 12 00:12:49 2020 From: lenikmutungi at gmail.com (Leni Kadali Mutungi) Date: Sun, 12 Apr 2020 07:12:49 +0300 Subject: [pytest-dev] also leaving pytest-dev for now In-Reply-To: <20200411204720.569bd5e2@segv> References: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> <20200411204720.569bd5e2@segv> Message-ID: Hi Matt. If you're looking for a non-Twitter source of info here we go: https://github.com/pytest-dev/pytest/pull/6663#discussion_r375763028 Bruno's comment when sharing this link was: You can take that from there... it is small things like that that get to you. On 2020-04-11 23:47, Matt Griswold wrote: > Is there a thread somewhere to see what's going on for those of us who > rarely twitter? > > Sorry to see everyone go -- but yes, enjoy your Easter! :) > > > * Ronny Pfannschmidt [200411 17:30 +0200]: >> Hi Dinu, >> >> i can understand your anger and sadness. >> I left the CoC team over the handling of this. >> Now that i removed myself from the Situation >> and the Position of Responsibility i am free to resolve the Fallout >> as i want. >> >> I believe i can speak for all 3 of us when i say that we don't want >> to obtain "justice" and "Resolution" by a angry mob. >> >> I for myself will go an enjoy easter with my family and >> will sort out the rest once i have my mind and feelings settled. >> >> I appreciate you get angry for us, because it shows you care, >> i wish you a positive outlet for that, from own experience >> i know that part can be tricky. >> >> -- Ronny >> >> Am 11.04.20 um 10:46 schrieb Dinu Gherman: >> >>> This makes me very sad for all three of you who leave), and I don?t >>> understand why in the ?discussion? so far at least on twitter >>> everybody tries to be ?politically correct? and not discuss the >>> cause of this issue. To me it seems like the CoCs that so many >>> were proud of having do not work as intended. And for our >>> community it would be better to handle such ?issues? in the same >>> ?open? way that we are proud of doing when working on ?open >>> source?. We have too many bastards ruining the world already. >>> >>> Best, >>> >>> Dinu >>> >>> >>>> On 10. Apr 2020, at 23:05, Ronny Pfannschmidt >>>> wrote: >>>> >>>> Hi everyone, >>>> >>>> >>>> after contemplaing a while i decided to join Bruno and Anthony. >>>> When i returned from my hiatus i declared that joy will be >>>> important, >>>> >>>> currently that joy is absent. >>>> >>>> >>>> -- Ronny >>>> >>>> _______________________________________________ >>>> pytest-dev mailing list >>>> pytest-dev at python.org >>>> https://mail.python.org/mailman/listinfo/pytest-dev >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev -- -- Kind regards, Leni Kadali Mutungi From lenikmutungi at gmail.com Sun Apr 12 00:31:12 2020 From: lenikmutungi at gmail.com (Leni Kadali Mutungi) Date: Sun, 12 Apr 2020 07:31:12 +0300 Subject: [pytest-dev] also leaving pytest-dev for now In-Reply-To: References: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> <20200411204720.569bd5e2@segv> Message-ID: Also a video by Anthony where he works on integrating flake8 with the latest pyflakes (he addresses part of the issue in the first part of the video): https://www.youtube.com/watch?v=nBlQogK1sRI On 2020-04-12 07:12, Leni Kadali Mutungi wrote: > Hi Matt. > > If you're looking for a non-Twitter source of info here we go: > > https://github.com/pytest-dev/pytest/pull/6663#discussion_r375763028 > > Bruno's comment when sharing this link was: > > You can take that from there... it is small things like that that get > to you. > > On 2020-04-11 23:47, Matt Griswold wrote: >> Is there a thread somewhere to see what's going on for those of us who >> rarely twitter? >> >> Sorry to see everyone go -- but yes, enjoy your Easter! :) >> >> >> * Ronny Pfannschmidt [200411 17:30 >> +0200]: >>> Hi Dinu, >>> >>> i can understand your anger and sadness. >>> I left the CoC team over the handling of this. >>> Now that i removed myself from the Situation >>> and the Position of Responsibility i am free to resolve the Fallout >>> ?? as i want. >>> >>> I believe i can speak for all 3 of us when i say that we don't want >>> ?? to obtain "justice" and "Resolution" by a angry mob. >>> >>> I for myself will go an enjoy easter with my family and >>> will sort out the rest once i have my mind and feelings settled. >>> >>> I appreciate you get angry for us, because it shows you care, >>> i wish you a positive outlet for that, from own experience >>> i know that part can be tricky. >>> >>> -- Ronny >>> >>> Am 11.04.20 um 10:46 schrieb Dinu Gherman: >>> >>>> This makes me very sad for all three of you who leave), and I don?t >>>> ?? understand why in the ?discussion? so far at least on twitter >>>> ?? everybody tries to be ?politically correct? and not discuss the >>>> ?? cause of this issue. To me it seems like the CoCs that so many >>>> ?? were proud of having do not work as intended. And for our >>>> ?? community it would be better to handle such ?issues? in the same >>>> ?? ?open? way that we are proud of doing when working on ?open >>>> ?? source?. We have too many bastards ruining the world already. >>>> >>>> Best, >>>> >>>> Dinu >>>> >>>>> On 10. Apr 2020, at 23:05, Ronny Pfannschmidt >>>>> ?? wrote: >>>>> >>>>> Hi everyone, >>>>> >>>>> >>>>> after contemplaing a while i decided to join Bruno and Anthony. >>>>> When i returned from my hiatus i declared that joy will be >>>>> ?? important, >>>>> >>>>> currently that joy is absent. >>>>> >>>>> >>>>> -- Ronny >>>>> >>>>> _______________________________________________ >>>>> pytest-dev mailing list >>>>> pytest-dev at python.org >>>>> https://mail.python.org/mailman/listinfo/pytest-dev >>> _______________________________________________ >>> pytest-dev mailing list >>> pytest-dev at python.org >>> https://mail.python.org/mailman/listinfo/pytest-dev >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev > -- -- Kind regards, Leni Kadali Mutungi From rwalton00 at gmail.com Sun Apr 12 07:46:03 2020 From: rwalton00 at gmail.com (Rob Walton) Date: Sun, 12 Apr 2020 12:46:03 +0100 Subject: [pytest-dev] also leaving pytest-dev for now In-Reply-To: References: <877475F0-BA6E-47EC-83C4-183BC2AF5A15@darwin.in-berlin.de> <20200411204720.569bd5e2@segv> Message-ID: This is my first post on this list. I'm a long time user of pytest. This is very sad news. Wishing you folks all the best. Thanks for your excellent work on the project! Rob On Sun, Apr 12, 2020 at 5:31 AM Leni Kadali Mutungi wrote: > Also a video by Anthony where he works on integrating flake8 with the > latest pyflakes (he addresses part of the issue in the first part of the > video): > > https://www.youtube.com/watch?v=nBlQogK1sRI > > On 2020-04-12 07:12, Leni Kadali Mutungi wrote: > > Hi Matt. > > > > If you're looking for a non-Twitter source of info here we go: > > > > https://github.com/pytest-dev/pytest/pull/6663#discussion_r375763028 > > > > Bruno's comment when sharing this link was: > > > > You can take that from there... it is small things like that that get > > to you. > > > > On 2020-04-11 23:47, Matt Griswold wrote: > >> Is there a thread somewhere to see what's going on for those of us who > >> rarely twitter? > >> > >> Sorry to see everyone go -- but yes, enjoy your Easter! :) > >> > >> > >> * Ronny Pfannschmidt [200411 17:30 > >> +0200]: > >>> Hi Dinu, > >>> > >>> i can understand your anger and sadness. > >>> I left the CoC team over the handling of this. > >>> Now that i removed myself from the Situation > >>> and the Position of Responsibility i am free to resolve the Fallout > >>> as i want. > >>> > >>> I believe i can speak for all 3 of us when i say that we don't want > >>> to obtain "justice" and "Resolution" by a angry mob. > >>> > >>> I for myself will go an enjoy easter with my family and > >>> will sort out the rest once i have my mind and feelings settled. > >>> > >>> I appreciate you get angry for us, because it shows you care, > >>> i wish you a positive outlet for that, from own experience > >>> i know that part can be tricky. > >>> > >>> -- Ronny > >>> > >>> Am 11.04.20 um 10:46 schrieb Dinu Gherman: > >>> > >>>> This makes me very sad for all three of you who leave), and I don?t > >>>> understand why in the ?discussion? so far at least on twitter > >>>> everybody tries to be ?politically correct? and not discuss the > >>>> cause of this issue. To me it seems like the CoCs that so many > >>>> were proud of having do not work as intended. And for our > >>>> community it would be better to handle such ?issues? in the same > >>>> ?open? way that we are proud of doing when working on ?open > >>>> source?. We have too many bastards ruining the world already. > >>>> > >>>> Best, > >>>> > >>>> Dinu > >>>> > >>>>> On 10. Apr 2020, at 23:05, Ronny Pfannschmidt > >>>>> wrote: > >>>>> > >>>>> Hi everyone, > >>>>> > >>>>> > >>>>> after contemplaing a while i decided to join Bruno and Anthony. > >>>>> When i returned from my hiatus i declared that joy will be > >>>>> important, > >>>>> > >>>>> currently that joy is absent. > >>>>> > >>>>> > >>>>> -- Ronny > >>>>> > >>>>> _______________________________________________ > >>>>> pytest-dev mailing list > >>>>> pytest-dev at python.org > >>>>> https://mail.python.org/mailman/listinfo/pytest-dev > >>> _______________________________________________ > >>> pytest-dev mailing list > >>> pytest-dev at python.org > >>> https://mail.python.org/mailman/listinfo/pytest-dev > >> _______________________________________________ > >> pytest-dev mailing list > >> pytest-dev at python.org > >> https://mail.python.org/mailman/listinfo/pytest-dev > > > -- > -- Kind regards, > Leni Kadali Mutungi > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kantonshiban at gmail.com Tue Apr 14 17:46:45 2020 From: kantonshiban at gmail.com (Anton Shiban) Date: Wed, 15 Apr 2020 03:16:45 +0530 Subject: [pytest-dev] How to duplicate pytest.Item inside function 'pytest_collection_modifyitems'? Message-ID: Hi, Can you please guide me *how to* *clone pytest.Item?* I want to take one *item* from *items* array (inside function ?pytest_collection_modifyitems?) and clone that *item* and add it to *items* array back. Can someone please guide to do this? Thanks, Shiban. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iomumtaz at gmail.com Tue Apr 14 17:55:48 2020 From: iomumtaz at gmail.com (Imran M) Date: Tue, 14 Apr 2020 14:55:48 -0700 Subject: [pytest-dev] How to duplicate pytest.Item inside function 'pytest_collection_modifyitems'? In-Reply-To: References: Message-ID: Sounds like you want a deep copy? https://docs.python.org/3.8/library/copy.html Not sure if there's a Pytest way of doing this. On Tue, Apr 14, 2020, 2:46 PM Anton Shiban wrote: > Hi, > > > Can you please guide me *how to* *clone pytest.Item?* > > I want to take one *item* from *items* array (inside function > ?pytest_collection_modifyitems?) and clone that *item* and add it to > *items* array back. > > Can someone please guide to do this? > > > Thanks, > > Shiban. > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kantonshiban at gmail.com Tue Apr 14 18:15:31 2020 From: kantonshiban at gmail.com (Anton Shiban) Date: Wed, 15 Apr 2020 03:45:31 +0530 Subject: [pytest-dev] How to duplicate pytest.Item inside function 'pytest_collection_modifyitems'? In-Reply-To: References: Message-ID: Thanks Imran. I tried this copy.deepcopy() already and it fails with below error. "TypeError: cannot deepcopy this pattern object" Is there any other way to do this? Thanks, Shiban. On Wed, Apr 15, 2020 at 3:26 AM Imran M wrote: > Sounds like you want a deep copy? > > https://docs.python.org/3.8/library/copy.html > > Not sure if there's a Pytest way of doing this. > > On Tue, Apr 14, 2020, 2:46 PM Anton Shiban wrote: > >> Hi, >> >> >> Can you please guide me *how to* *clone pytest.Item?* >> >> I want to take one *item* from *items* array (inside function >> ?pytest_collection_modifyitems?) and clone that *item* and add it to >> *items* array back. >> >> Can someone please guide to do this? >> >> >> Thanks, >> >> Shiban. >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at the-compiler.org Wed Apr 15 03:37:48 2020 From: me at the-compiler.org (Florian Bruhin) Date: Wed, 15 Apr 2020 09:37:48 +0200 Subject: [pytest-dev] How to duplicate pytest.Item inside function 'pytest_collection_modifyitems'? In-Reply-To: References: Message-ID: <20200415073748.nku3ujo5s2rca5un@hooch.localdomain> Hey, On Wed, Apr 15, 2020 at 03:16:45AM +0530, Anton Shiban wrote: > Can you please guide me *how to* *clone pytest.Item?* > > I want to take one *item* from *items* array (inside function > ?pytest_collection_modifyitems?) and clone that *item* and add it to *items* > array back. > > Can someone please guide to do this? I doubt that's possible - what's your goal? You might be able to use pytest_generate_tests instead, see e.g. pytest-repeat: https://github.com/pytest-dev/pytest-repeat/blob/master/pytest_repeat.py Florian -- me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org https://bruhin.software/ | https://github.com/sponsors/The-Compiler/ GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc I love long mails! | https://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From opensource at ronnypfannschmidt.de Wed Apr 15 04:25:37 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Wed, 15 Apr 2020 10:25:37 +0200 Subject: [pytest-dev] How to duplicate pytest.Item inside function 'pytest_collection_modifyitems'? In-Reply-To: <810da89b-b379-525b-e05a-c93d07565f34@ronnypfannschmidt.de> References: <810da89b-b379-525b-e05a-c93d07565f34@ronnypfannschmidt.de> Message-ID: <76911b82-1ae9-6d2d-67ff-fe9818d44531@ronnypfannschmidt.de> *copey with the correct mail* Hi Shiban, its not safely possible to clone a item in general. A) you need to make a new nodeid to prevent some issues B) there is no safe cloning mechanism declared, different subtypes of items have different mutable state you dont want to mix I believe the closest you can get is creating a new item that is reasonably equivalent. The Details of that would depend on what the actual Item subtype is. -- Ronny Am 15.04.20 um 07:45 schrieb Ronny Pfannschmidt: > > Hi Shiban, > > its not safely possible to clone a item in general. > > A) you need to make a new nodeid to prevent some issues > > B) there is no safe cloning mechanism declared, different subtypes of > items have different mutable state you dont want to mix > > I believe the closest you can get is creating a new item that is > reasonably equivalent. > The Details of that would depend on what the actual Item subtype is. > > -- Ronny > > Am 14.04.20 um 23:46 schrieb Anton Shiban: >> >> Hi, >> >> >> Can you please guide me *how to* *clone pytest.Item?* >> >> I want to take one *item* from *items* array (inside function >> ?pytest_collection_modifyitems?) and clone that *item* and add it to >> *items* array back. >> >> Can someone please guide to do this? >> >> >> Thanks, >> >> Shiban. >> >> >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From kantonshiban at gmail.com Wed Apr 15 12:31:15 2020 From: kantonshiban at gmail.com (Anton Shiban) Date: Wed, 15 Apr 2020 22:01:15 +0530 Subject: [pytest-dev] How to duplicate pytest.Item inside function 'pytest_collection_modifyitems'? In-Reply-To: <76911b82-1ae9-6d2d-67ff-fe9818d44531@ronnypfannschmidt.de> References: <810da89b-b379-525b-e05a-c93d07565f34@ronnypfannschmidt.de> <76911b82-1ae9-6d2d-67ff-fe9818d44531@ronnypfannschmidt.de> Message-ID: Hi Ronny, Thanks a lot for your reply, I got your points that pytest does have such support. And also I got your points that I can create new Item which is reasonably equivalent, but I dont know whether the same code may continuously work for all future release of PYTEST and it may not be a suggested way to do this. Let me explain my requirement. 1) I am writing automation test for upgrade of multiple components. 2) For this, I have to execute group of tests(using pytest marker) before executing component-A 3) Then I upgrade component-A by executing one testcase. Then again need to execute same group of test again(using pytest marker). (may be few more group of test also) 4) Then upgrade component-B by executing another testcase. Then again need to execute the same group of test again (using pytest marker). ( may be few more group of test also) I have to repeat this for all available number of components specified in the configuration file. Configuration file will have details of what all components to be upgraded and what all testcases (with marker name) to be executed before and after upgrade of every components. So, I planed to write code as explained in below step. 1) Run pytest CLI by giving root test path(of all test files). So that all the tests are collected by pytest. 2) Read the configuration file (which has the upgrade plan) from ' pytest_collection_modifyitems' 3) Here items list will have all the test Items. 4) Identity which tests to be exuected(from the pytest marker) from the configuration file. 5) Filter those tests usign marker name and put it on another items list (called '*final_items_list*'). This final_items_list will be returned from this function 6) Next, Identify what components to be upgraded from the configuration file. Identity the testcase name(which does this componet upgrade) from the items list and put it on the *final_items_list*. 7) Identity again which tests to be executed after that component upgrade. Now filter those tests using marker name and put it into the *final_items_list*. Here test items are may be same tests which is collected in step-4. 8) I repeat the same till all components specified in the configuration file. Here, the *final_items_list *will have same Items repeated (means same memory reference of items). So if one item(test) fails, then pytest will mark 'fail' for all all other same items as well. And also facing pytest failures when pytest executing same items again. Thats why, I wanted to clone the Item before adding into '*final_items_list*'. Do you have any suggestion to achieve this in pytest? Thanks a lot, Shiban. On Wed, Apr 15, 2020 at 1:55 PM Ronny Pfannschmidt < opensource at ronnypfannschmidt.de> wrote: > *copey with the correct mail* > > Hi Shiban, > > its not safely possible to clone a item in general. > > A) you need to make a new nodeid to prevent some issues > > B) there is no safe cloning mechanism declared, different subtypes of > items have different mutable state you dont want to mix > > I believe the closest you can get is creating a new item that is > reasonably equivalent. > The Details of that would depend on what the actual Item subtype is. > > -- Ronny > Am 15.04.20 um 07:45 schrieb Ronny Pfannschmidt: > > Hi Shiban, > > its not safely possible to clone a item in general. > > A) you need to make a new nodeid to prevent some issues > > B) there is no safe cloning mechanism declared, different subtypes of > items have different mutable state you dont want to mix > > I believe the closest you can get is creating a new item that is > reasonably equivalent. > The Details of that would depend on what the actual Item subtype is. > > -- Ronny > Am 14.04.20 um 23:46 schrieb Anton Shiban: > > Hi, > > > Can you please guide me *how to* *clone pytest.Item?* > > I want to take one *item* from *items* array (inside function > ?pytest_collection_modifyitems?) and clone that *item* and add it to > *items* array back. > > Can someone please guide to do this? > > > Thanks, > > Shiban. > > _______________________________________________ > pytest-dev mailing listpytest-dev at python.orghttps://mail.python.org/mailman/listinfo/pytest-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Sat Apr 18 16:05:48 2020 From: holger at merlinux.eu (holger krekel) Date: Sat, 18 Apr 2020 22:05:48 +0200 Subject: [pytest-dev] background talks on pytest happenings Message-ID: <20200418200548.GL20256@beto> Hi pytest folks, i am still talking with various people involved with pytest happenings (culminating in several core devs taking out-time) last week. I got involved after some folks asked me, as founder and 10y+ maintainer of pytest, to help find a way out. If you have anything you'd like to tell me, please write me 1:1, especially if you have comments or suggestions on how to proceed. I aim to have a suggestion later in April. Please bear with me in taking some time as i am also dealing with a lot of non-pytest and personal issues currently, and it took and takes time to schedule talks. Meanwhile, thanks to all the people who did such a great job with pytest the last years and sorry for all the bad code i've written and that couldn't be mitigated yet ;) thanks and best, holger