From aidis at pycon.lt Wed Mar 4 01:22:10 2020 From: aidis at pycon.lt (Aidis Stukas @ PyConLT) Date: Wed, 4 Mar 2020 08:22:10 +0200 Subject: [pytest-dev] Invitation to PyCon Lithuania for talks/sprints Message-ID: Hi PyTest developers, I am looking for someone to give a talk/run a sprint on pytest at PyCon Lithuania conference (https://www.pycon.lt) The conference will take place on May 22-24 with 300+ participants. Please contact me if you are interested. -------------- next part -------------- An HTML attachment was scrubbed... URL: From opensource at ronnypfannschmidt.de Sat Mar 7 13:48:34 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Sat, 7 Mar 2020 19:48:34 +0100 Subject: [pytest-dev] Proposal: Elevating Ran Benita/@bluetech from Contributor to Core Message-ID: Hi everyone, over the last few months Ran demonstrated both excellent communication and contribution. I believe Ran would make a great addition to the Core team. So after reaching out to Ran to check if that's ok, I'm asking the rest us to formalize addition.. -- Ronny From nicoddemus at gmail.com Sun Mar 8 14:57:31 2020 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Sun, 8 Mar 2020 15:57:31 -0300 Subject: [pytest-dev] Proposal: Elevating Ran Benita/@bluetech from Contributor to Core In-Reply-To: References: Message-ID: Definitely +1 On Sat, Mar 7, 2020 at 3:55 PM Ronny Pfannschmidt < opensource at ronnypfannschmidt.de> wrote: > Hi everyone, > > over the last few months Ran demonstrated both excellent communication > and contribution. > I believe Ran would make a great addition to the Core team. > > So after reaching out to Ran to check if that's ok, > I'm asking the rest us to formalize addition.. > > -- Ronny > > _______________________________________________ > 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 tgoodlet at gmail.com Sun Mar 8 15:51:05 2020 From: tgoodlet at gmail.com (Tyler Goodlet) Date: Sun, 8 Mar 2020 15:51:05 -0400 Subject: [pytest-dev] Proposal: Elevating Ran Benita/@bluetech from Contributor to Core In-Reply-To: References: Message-ID: +1 from myself as well considering the couple contribs to pluggy :) - goodboy On Sat, Mar 7, 2020 at 1:55 PM Ronny Pfannschmidt wrote: > > Hi everyone, > > over the last few months Ran demonstrated both excellent communication > and contribution. > I believe Ran would make a great addition to the Core team. > > So after reaching out to Ran to check if that's ok, > I'm asking the rest us to formalize addition.. > > -- Ronny > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From nicoddemus at gmail.com Mon Mar 9 16:25:44 2020 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Mon, 9 Mar 2020 17:25:44 -0300 Subject: [pytest-dev] Proposal: Elevating Ran Benita/@bluetech from Contributor to Core In-Reply-To: References: Message-ID: Hi everyone, I think this is unanimous then, I've added bluetech to the Core team. Cheers, Bruno On Sun, Mar 8, 2020 at 4:51 PM Tyler Goodlet wrote: > +1 from myself as well considering the couple contribs to pluggy :) > > - goodboy > > On Sat, Mar 7, 2020 at 1:55 PM Ronny Pfannschmidt > wrote: > > > > Hi everyone, > > > > over the last few months Ran demonstrated both excellent communication > > and contribution. > > I believe Ran would make a great addition to the Core team. > > > > So after reaching out to Ran to check if that's ok, > > I'm asking the rest us to formalize addition.. > > > > -- 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ran at unusedvar.com Tue Mar 10 14:31:20 2020 From: ran at unusedvar.com (Ran Benita) Date: Tue, 10 Mar 2020 20:31:20 +0200 Subject: [pytest-dev] =?utf-8?q?Proposal=3A_Elevating_Ran_Benita/=40bluet?= =?utf-8?q?ech_from_Contributor_to_Core?= In-Reply-To: References: Message-ID: <9f7a717d-45d8-4f2f-9aa1-aade1253b362@www.fastmail.com> Thanks everyone. I'm happy to be a part of the team. -------------- next part -------------- An HTML attachment was scrubbed... URL: From opensource at ronnypfannschmidt.de Thu Mar 12 15:32:59 2020 From: opensource at ronnypfannschmidt.de (Ronny Pfannschmidt) Date: Thu, 12 Mar 2020 20:32:59 +0100 Subject: [pytest-dev] pytest 5.4.0 released Message-ID: <2ab8d7e7-83fb-5938-2dc9-18ea1f3b1104@ronnypfannschmidt.de> pytest-5.4.0 ======================================= The pytest team is proud to announce the 5.4.0 release! pytest is a mature Python testing tool with more than a 2000 tests against itself, passing on many different interpreters and platforms. This release contains a number of bug fixes and improvements, so users are encouraged to take a look at the CHANGELOG: https://docs.pytest.org/en/latest/changelog.html For complete documentation, please visit: https://docs.pytest.org/en/latest/ As usual, you can upgrade from PyPI via: pip install -U pytest Thanks to all who contributed to this release, among them: * Anthony Sottile * Bruno Oliveira * Christoph Buelter * Christoph B?lter * Daniel Arndt * Daniel Hahler * Holger Kohr * Hugo * Hugo van Kemenade * Jakub Mitoraj * Kyle Altendorf * Minuddin Ahmed Rana * Nathaniel Compton * ParetoLife * Pauli Virtanen * Philipp Loose * Ran Benita * Ronny Pfannschmidt * Stefan Scherfke * Stefano Mazzucco * TWood67 * Tobias Schmidt * Tom?? Gaven?iak * Vinay Calastry * Vladyslav Rachek * Zac Hatfield-Dodds * captainCapitalism * cmachalo * gftea * kpinc * rebecca-palmer * sdementen Happy testing, The pytest Development Team From nicoddemus at gmail.com Fri Mar 13 10:08:11 2020 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Fri, 13 Mar 2020 11:08:11 -0300 Subject: [pytest-dev] pytest 5.4.1 released! Message-ID: pytest 5.4.1 has just been released to PyPI. This is a bug-fix release, fixing a regression discovered in 5.4.0, being a drop-in replacement. To upgrade:: pip install --upgrade pytest The full changelog is available at https://docs.pytest.org/en/latest/changelog.html. Thanks to all who contributed to this release, among them: * Bruno Oliveira Happy testing, The pytest Development Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Tue Mar 17 07:46:49 2020 From: holger at merlinux.eu (holger krekel) Date: Tue, 17 Mar 2020 12:46:49 +0100 Subject: [pytest-dev] message to my IT/hacking friends Mar17 Message-ID: <20200317114649.GN32362@beto> Dear pytestonistas, i sincerely hope that you all are well or find ways of adjusting -- #covid19 is a social and emotional challenge of planeraty scale. I've written down a little "message to my IT/hacking" friends: https://holgerkrekel.net/2020/03/17/message-to-my-it-hacking-friends-mar17/ As some of you know i am involved in Delta Chat and if you feel you would like to help build a resilient messaging eco-system that works well in shutdown situations (it does in Cuba, Russia, Iran and other places) ... and if you feel you and people around you and close to you are in a good enough situation to help ... then maybe join #deltachat on freenode and https://lists.codespeak.net/postorius/lists/delta.codespeak.net/ ... i intend to post some bits there where i'd love help from Pythonistas and pytestas :) But really, don't feel obliged in any way -- stay safe and socially distant, take breaks from the digital! holger From m at maximilianroos.com Thu Mar 26 18:29:16 2020 From: m at maximilianroos.com (Maximilian Roos) Date: Thu, 26 Mar 2020 18:29:16 -0400 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: Hi there, To prefix: as a long time user and evangelizer of pytest, a big thank you for the superb tool. I wanted to build a tool that replaces incorrect values in tests with correct values, similar to frameworks like rust's insta or ocaml's ppx_expect , but ideally in the pytest spirit of retaining the use of `assert` rather than a custom function. I built a PoC that successfully replaces the *first* error in a test with the correct value. As per that README, it only works on the first failure, because the test doesn't continue execution beyond that. *Is there any way of allowing execution to continue, without ripping up the internals of pytest?* My prior is "no", since the assertion rewrite still retains an assertion, and there's no hook for changing that. Ref: a similar question I asked @okken https://github.com/okken/pytest-check/issues/32 Thank you, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Fri Mar 27 07:46:51 2020 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Fri, 27 Mar 2020 08:46:51 -0300 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: Hi Maximilian, On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos wrote: > > To prefix: as a long time user and evangelizer of pytest, a big thank you > for the superb tool. > Thanks for the kind words, we appreciate it. > As per that README, it only works on the first failure, because the test > doesn't continue execution beyond that. *Is there any way of allowing > execution to continue, without ripping up the internals of pytest?* My > prior is "no", since the assertion rewrite still retains an assertion, and > there's no hook for changing that. > Not at the moment I'm afraid. I think it should be possible to implement a hook that transforms the AST, which our rewriter would then call. I think, with this hook in place, you would be able to rewrite assert statements into a function call of your plugin, which would then be free to do whatever it wanted. If you are interested, I suggest writing up a proposal in the issue tracker so it can be discussed. Cheers, Bruno > Ref: a similar question I asked @okken > https://github.com/okken/pytest-check/issues/32 > > Thank you, > Max > _______________________________________________ > 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 victor.maryama at gmail.com Fri Mar 27 09:26:12 2020 From: victor.maryama at gmail.com (Victor Maryama) Date: Fri, 27 Mar 2020 14:26:12 +0100 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: What about pytest-assume as a context manager around the assert line? That way you get the soft assertions feature and pytest still rewrites the assertions. On Fri, Mar 27, 2020, 12:47 PM Bruno Oliveira wrote: > Hi Maximilian, > > On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos > wrote: > >> >> To prefix: as a long time user and evangelizer of pytest, a big thank you >> for the superb tool. >> > > Thanks for the kind words, we appreciate it. > > >> As per that README, it only works on the first failure, because the test >> doesn't continue execution beyond that. *Is there any way of allowing >> execution to continue, without ripping up the internals of pytest?* My >> prior is "no", since the assertion rewrite still retains an assertion, and >> there's no hook for changing that. >> > > Not at the moment I'm afraid. > > I think it should be possible to implement a hook that transforms the AST, > which our rewriter would then call. I think, with this hook in place, you > would be able to rewrite assert statements into a function call of your > plugin, which would then be free to do whatever it wanted. If you are > interested, I suggest writing up a proposal in the issue tracker so it can > be discussed. > > Cheers, > Bruno > > >> Ref: a similar question I asked @okken >> https://github.com/okken/pytest-check/issues/32 >> >> Thank you, >> Max >> _______________________________________________ >> 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 m at maximilianroos.com Fri Mar 27 12:09:39 2020 From: m at maximilianroos.com (Maximilian Roos) Date: Fri, 27 Mar 2020 12:09:39 -0400 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: Hi Victor, > What about pytest-assume as a context manager around the assert line? Yes, this could work with either a context manager or a function like pytest-check uses. But it couples the plugin to the tests; it's no longer possible to run the plugin on normal tests with a plain `assert`, which is some of the brilliant philosophy of pytest. Without such a hook, I think the function or context manager is the best path forward, and is a reasonable way to build a better prototype before adding hooks deep in pytest internals. Thank you! Max On Fri, 27 Mar 2020 at 09:26, Victor Maryama wrote: > What about pytest-assume as a context manager around the assert line? > That way you get the soft assertions feature and pytest still rewrites the > assertions. > > On Fri, Mar 27, 2020, 12:47 PM Bruno Oliveira > wrote: > >> Hi Maximilian, >> >> On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos >> wrote: >> >>> >>> To prefix: as a long time user and evangelizer of pytest, a big thank >>> you for the superb tool. >>> >> >> Thanks for the kind words, we appreciate it. >> >> >>> As per that README, it only works on the first failure, because the test >>> doesn't continue execution beyond that. *Is there any way of allowing >>> execution to continue, without ripping up the internals of pytest?* My >>> prior is "no", since the assertion rewrite still retains an assertion, and >>> there's no hook for changing that. >>> >> >> Not at the moment I'm afraid. >> >> I think it should be possible to implement a hook that transforms the >> AST, which our rewriter would then call. I think, with this hook in place, >> you would be able to rewrite assert statements into a function call of your >> plugin, which would then be free to do whatever it wanted. If you are >> interested, I suggest writing up a proposal in the issue tracker so it can >> be discussed. >> >> Cheers, >> Bruno >> >> >>> Ref: a similar question I asked @okken >>> https://github.com/okken/pytest-check/issues/32 >>> >>> Thank you, >>> Max >>> _______________________________________________ >>> 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 victor.maryama at gmail.com Fri Mar 27 12:19:28 2020 From: victor.maryama at gmail.com (Victor Maryama) Date: Fri, 27 Mar 2020 17:19:28 +0100 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: Oh sure, I see now what you mean. Back then when I was thinking about this subject it seemed to me that soft assertions could be something implemented in pytest core itself using the assertion rewriting module (which in turn would put the assertion calls around the context manager), along the lines of what Bruno mentioned. Except that I probably would not go for a generic hook, but just the soft assertion feature itself. On Fri, Mar 27, 2020, 5:09 PM Maximilian Roos wrote: > Hi Victor, > > > What about pytest-assume as a context manager around the assert line? > > Yes, this could work with either a context manager or a function like > pytest-check uses. > But it couples the plugin to the tests; it's no longer possible to run the > plugin on normal tests with a plain `assert`, which is some of the > brilliant philosophy of pytest. > > Without such a hook, I think the function or context manager is the best > path forward, and is a reasonable way to build a better prototype before > adding hooks deep in pytest internals. > > Thank you! > Max > > On Fri, 27 Mar 2020 at 09:26, Victor Maryama > wrote: > >> What about pytest-assume as a context manager around the assert line? >> That way you get the soft assertions feature and pytest still rewrites >> the assertions. >> >> On Fri, Mar 27, 2020, 12:47 PM Bruno Oliveira >> wrote: >> >>> Hi Maximilian, >>> >>> On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos >>> wrote: >>> >>>> >>>> To prefix: as a long time user and evangelizer of pytest, a big thank >>>> you for the superb tool. >>>> >>> >>> Thanks for the kind words, we appreciate it. >>> >>> >>>> As per that README, it only works on the first failure, because the >>>> test doesn't continue execution beyond that. *Is there any way of >>>> allowing execution to continue, without ripping up the internals of pytest?* >>>> My prior is "no", since the assertion rewrite still retains an assertion, >>>> and there's no hook for changing that. >>>> >>> >>> Not at the moment I'm afraid. >>> >>> I think it should be possible to implement a hook that transforms the >>> AST, which our rewriter would then call. I think, with this hook in place, >>> you would be able to rewrite assert statements into a function call of your >>> plugin, which would then be free to do whatever it wanted. If you are >>> interested, I suggest writing up a proposal in the issue tracker so it can >>> be discussed. >>> >>> Cheers, >>> Bruno >>> >>> >>>> Ref: a similar question I asked @okken >>>> https://github.com/okken/pytest-check/issues/32 >>>> >>>> Thank you, >>>> Max >>>> _______________________________________________ >>>> 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 m at maximilianroos.com Fri Mar 27 12:28:03 2020 From: m at maximilianroos.com (Maximilian Roos) Date: Fri, 27 Mar 2020 12:28:03 -0400 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: Yes exactly, we're aligned. Thanks Victor. On Fri, 27 Mar 2020 at 12:19, Victor Maryama wrote: > Oh sure, I see now what you mean. > > Back then when I was thinking about this subject it seemed to me that soft > assertions could be something implemented in pytest core itself using the > assertion rewriting module (which in turn would put the assertion calls > around the context manager), along the lines of what Bruno mentioned. > Except that I probably would not go for a generic hook, but just the soft > assertion feature itself. > > > On Fri, Mar 27, 2020, 5:09 PM Maximilian Roos > wrote: > >> Hi Victor, >> >> > What about pytest-assume as a context manager around the assert line? >> >> Yes, this could work with either a context manager or a function like >> pytest-check uses. >> But it couples the plugin to the tests; it's no longer possible to run >> the plugin on normal tests with a plain `assert`, which is some of the >> brilliant philosophy of pytest. >> >> Without such a hook, I think the function or context manager is the best >> path forward, and is a reasonable way to build a better prototype before >> adding hooks deep in pytest internals. >> >> Thank you! >> Max >> >> On Fri, 27 Mar 2020 at 09:26, Victor Maryama >> wrote: >> >>> What about pytest-assume as a context manager around the assert line? >>> That way you get the soft assertions feature and pytest still rewrites >>> the assertions. >>> >>> On Fri, Mar 27, 2020, 12:47 PM Bruno Oliveira >>> wrote: >>> >>>> Hi Maximilian, >>>> >>>> On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos >>>> wrote: >>>> >>>>> >>>>> To prefix: as a long time user and evangelizer of pytest, a big thank >>>>> you for the superb tool. >>>>> >>>> >>>> Thanks for the kind words, we appreciate it. >>>> >>>> >>>>> As per that README, it only works on the first failure, because the >>>>> test doesn't continue execution beyond that. *Is there any way of >>>>> allowing execution to continue, without ripping up the internals of pytest?* >>>>> My prior is "no", since the assertion rewrite still retains an assertion, >>>>> and there's no hook for changing that. >>>>> >>>> >>>> Not at the moment I'm afraid. >>>> >>>> I think it should be possible to implement a hook that transforms the >>>> AST, which our rewriter would then call. I think, with this hook in place, >>>> you would be able to rewrite assert statements into a function call of your >>>> plugin, which would then be free to do whatever it wanted. If you are >>>> interested, I suggest writing up a proposal in the issue tracker so it can >>>> be discussed. >>>> >>>> Cheers, >>>> Bruno >>>> >>>> >>>>> Ref: a similar question I asked @okken >>>>> https://github.com/okken/pytest-check/issues/32 >>>>> >>>>> Thank you, >>>>> Max >>>>> _______________________________________________ >>>>> 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 variedthoughts at gmail.com Fri Mar 27 12:30:49 2020 From: variedthoughts at gmail.com (Brian Okken) Date: Fri, 27 Mar 2020 09:30:49 -0700 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: Victor, This would be brilliant. There is a fairly large need for a soft assert feature. pytest-check would not be needed if it existed. I personally would not want it to be an overriding of assert, but perhaps a different function that is used almost identically to assert, including failing the test, but just not stopping execution. This is also the reason why many people resort to subtest. -Brian Okken On Fri, Mar 27, 2020 at 9:19 AM Victor Maryama wrote: > Oh sure, I see now what you mean. > > Back then when I was thinking about this subject it seemed to me that soft > assertions could be something implemented in pytest core itself using the > assertion rewriting module (which in turn would put the assertion calls > around the context manager), along the lines of what Bruno mentioned. > Except that I probably would not go for a generic hook, but just the soft > assertion feature itself. > > > On Fri, Mar 27, 2020, 5:09 PM Maximilian Roos > wrote: > >> Hi Victor, >> >> > What about pytest-assume as a context manager around the assert line? >> >> Yes, this could work with either a context manager or a function like >> pytest-check uses. >> But it couples the plugin to the tests; it's no longer possible to run >> the plugin on normal tests with a plain `assert`, which is some of the >> brilliant philosophy of pytest. >> >> Without such a hook, I think the function or context manager is the best >> path forward, and is a reasonable way to build a better prototype before >> adding hooks deep in pytest internals. >> >> Thank you! >> Max >> >> On Fri, 27 Mar 2020 at 09:26, Victor Maryama >> wrote: >> >>> What about pytest-assume as a context manager around the assert line? >>> That way you get the soft assertions feature and pytest still rewrites >>> the assertions. >>> >>> On Fri, Mar 27, 2020, 12:47 PM Bruno Oliveira >>> wrote: >>> >>>> Hi Maximilian, >>>> >>>> On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos >>>> wrote: >>>> >>>>> >>>>> To prefix: as a long time user and evangelizer of pytest, a big thank >>>>> you for the superb tool. >>>>> >>>> >>>> Thanks for the kind words, we appreciate it. >>>> >>>> >>>>> As per that README, it only works on the first failure, because the >>>>> test doesn't continue execution beyond that. *Is there any way of >>>>> allowing execution to continue, without ripping up the internals of pytest?* >>>>> My prior is "no", since the assertion rewrite still retains an assertion, >>>>> and there's no hook for changing that. >>>>> >>>> >>>> Not at the moment I'm afraid. >>>> >>>> I think it should be possible to implement a hook that transforms the >>>> AST, which our rewriter would then call. I think, with this hook in place, >>>> you would be able to rewrite assert statements into a function call of your >>>> plugin, which would then be free to do whatever it wanted. If you are >>>> interested, I suggest writing up a proposal in the issue tracker so it can >>>> be discussed. >>>> >>>> Cheers, >>>> Bruno >>>> >>>> >>>>> Ref: a similar question I asked @okken >>>>> https://github.com/okken/pytest-check/issues/32 >>>>> >>>>> Thank you, >>>>> Max >>>>> _______________________________________________ >>>>> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From variedthoughts at gmail.com Fri Mar 27 12:32:53 2020 From: variedthoughts at gmail.com (Brian Okken) Date: Fri, 27 Mar 2020 09:32:53 -0700 Subject: [pytest-dev] Fwd: Continuing on failures In-Reply-To: References: Message-ID: I'd even be more than ok with a context manager approach and even using asserts within the context manager. As long as you can have more than one assert fail within the context. -Brian On Fri, Mar 27, 2020 at 9:30 AM Brian Okken wrote: > Victor, > > This would be brilliant. There is a fairly large need for a soft assert > feature. > pytest-check would not be needed if it existed. > > I personally would not want it to be an overriding of assert, but perhaps > a different function that is used almost identically to assert, including > failing the test, but just not stopping execution. > This is also the reason why many people resort to subtest. > > -Brian Okken > > On Fri, Mar 27, 2020 at 9:19 AM Victor Maryama > wrote: > >> Oh sure, I see now what you mean. >> >> Back then when I was thinking about this subject it seemed to me that >> soft assertions could be something implemented in pytest core itself using >> the assertion rewriting module (which in turn would put the assertion calls >> around the context manager), along the lines of what Bruno mentioned. >> Except that I probably would not go for a generic hook, but just the soft >> assertion feature itself. >> >> >> On Fri, Mar 27, 2020, 5:09 PM Maximilian Roos >> wrote: >> >>> Hi Victor, >>> >>> > What about pytest-assume as a context manager around the assert line? >>> >>> Yes, this could work with either a context manager or a function like >>> pytest-check uses. >>> But it couples the plugin to the tests; it's no longer possible to run >>> the plugin on normal tests with a plain `assert`, which is some of the >>> brilliant philosophy of pytest. >>> >>> Without such a hook, I think the function or context manager is the best >>> path forward, and is a reasonable way to build a better prototype before >>> adding hooks deep in pytest internals. >>> >>> Thank you! >>> Max >>> >>> On Fri, 27 Mar 2020 at 09:26, Victor Maryama >>> wrote: >>> >>>> What about pytest-assume as a context manager around the assert line? >>>> That way you get the soft assertions feature and pytest still rewrites >>>> the assertions. >>>> >>>> On Fri, Mar 27, 2020, 12:47 PM Bruno Oliveira >>>> wrote: >>>> >>>>> Hi Maximilian, >>>>> >>>>> On Thu, Mar 26, 2020 at 7:29 PM Maximilian Roos >>>>> wrote: >>>>> >>>>>> >>>>>> To prefix: as a long time user and evangelizer of pytest, a big thank >>>>>> you for the superb tool. >>>>>> >>>>> >>>>> Thanks for the kind words, we appreciate it. >>>>> >>>>> >>>>>> As per that README, it only works on the first failure, because the >>>>>> test doesn't continue execution beyond that. *Is there any way of >>>>>> allowing execution to continue, without ripping up the internals of pytest?* >>>>>> My prior is "no", since the assertion rewrite still retains an assertion, >>>>>> and there's no hook for changing that. >>>>>> >>>>> >>>>> Not at the moment I'm afraid. >>>>> >>>>> I think it should be possible to implement a hook that transforms the >>>>> AST, which our rewriter would then call. I think, with this hook in place, >>>>> you would be able to rewrite assert statements into a function call of your >>>>> plugin, which would then be free to do whatever it wanted. If you are >>>>> interested, I suggest writing up a proposal in the issue tracker so it can >>>>> be discussed. >>>>> >>>>> Cheers, >>>>> Bruno >>>>> >>>>> >>>>>> Ref: a similar question I asked @okken >>>>>> https://github.com/okken/pytest-check/issues/32 >>>>>> >>>>>> Thank you, >>>>>> Max >>>>>> _______________________________________________ >>>>>> 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 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cito at online.de Fri Mar 27 14:38:46 2020 From: cito at online.de (Christoph Zwerschke) Date: Fri, 27 Mar 2020 19:38:46 +0100 Subject: [pytest-dev] Grouping tests Message-ID: <0104ca73-424a-a040-920e-156590225325@online.de> Hi all, I hope this is the right place to ask the following. I am currently using https://github.com/ropez/pytest-describe to group tests in a large test suite because it looks nicer than using classes and looks more like the tests in the JavaScript library that I am recreating in Python. Also, when using classes, tests methods will need an additional "self". And I'm not sure whether they can be nested. Unfortunately, pytest-describe has gotten rusty, and there are issues (e.g. https://github.com/ropez/pytest-describe/issues/26) which need help by some pytest experts. Is someone here interested in working on this and keeping pytest-describe alive and compatible with newer pytest versions? Otherwise, any alternative suggestions for grouping tests nicely? -- Christoph