From flub at devork.be Wed Apr 1 00:55:36 2015 From: flub at devork.be (Floris Bruynooghe) Date: Tue, 31 Mar 2015 23:55:36 +0100 Subject: [pytest-dev] release checklist / de-monopolizing release process In-Reply-To: <20150327083728.GO15735@merlinux.eu> References: <20150326131223.GG15735@merlinux.eu> <20150326132323.GH15735@merlinux.eu> <20150327083728.GO15735@merlinux.eu> Message-ID: Hi, I started doing inline replying but I think it got confusing. I mostly agree so far, including with semantic versioning, but would like to summarise the usage of branches how I think/understand it should work: Each release has a release/maintenance branch: pytest-2.6, pytest-2.7 etc. This is where the next bugfix release is prepared, e.g. 2.7.1. The default branch is where the next feature release is prepared, e.g. 2.8. Any bug fixes for a release should be committed to these release branches, once committed there they should be merged to the default branch. I think whoever merges the pull request is responsible for also merging it into default. Any live website updates should be committed to the last release branch which should be hooked up to the "latest" doc-install target. At any point we should be able to install the docs from the last release branch to the live site. This does mean sometimes doc changes for a bugfix release appear before the bugfix is released. Maybe we should address this in the long term by splitting off the website to a different repo from the docs, so you serve http://pytest.org separate from http://pytest.org/latest and http://pytest.org/dev. That way out-of band updates can happen. This has a slight influence on the release procedure: When creating a new feature release one does the final commits to set the doc-install target to "latest" in a new branch, e.g. pytest-2.8, then tag the release. Once the release is tagged versions can be bumped in the release branch, e.g. 2.8.1.dev0 as well as the default branch, e.g. 2.9.0.dev0. The main downside of all this is that it will produce annoying merge conflicts in the changelog for bugfixes which we will have to manually resolve every time. So what this means for the current release-checklist pull-request is that it could be used to create the pytest-2.7 branch. And then we can bump versions in default to 2.8.0.dev0. Hope that all makes sense. On 27 March 2015 at 08:37, holger krekel wrote: > On Thu, Mar 26, 2015 at 19:12 -0300, Bruno Oliveira wrote: > > > This means that even little feature additions or changes in behaviour > > > would neccessarily need to go to pytest-2.8. In the past, i have > > > allowed such little additions where i was pretty sure they wouldn't > break > > > things into micro releases > > > > According to Semantic Versioning, strictly speaking changes in existing > > behavior would have to bump the minor number (except bugs, which would > > bump MICRO). Not sure how people feel about it, but some > > (myself included) like to know that they can safely update a library/tool > > without having to review your code for usage changes (not that I've ever > had > > this problem with pytest, mind you). MAJOR should be updated for > > backward-incompatible changes, but I don't see that happening anytime > soon. > > > > In the end of the day, I guess just having a couple of guidelines/rules > in > > place > > is that everyone agrees on is good enough. > > Note that virtually pytest releases are supposed to be backward compatible. > And even bug fixes can introduce backward compat problems. > I agree with Bruno that semantic versioning is a nice standard to follow and people are familiar with it these days. So any bugfixes for 2.7 go to a pytest-2.7 branch while any new features go into default. I realise that this means most releases will be 2.X.0 with an occasional 2.X.1 or so and probably never a 3.X.0, but I think that's perfectly fine. Regards, Floris -------------- next part -------------- An HTML attachment was scrubbed... URL: From flub at devork.be Wed Apr 1 00:57:16 2015 From: flub at devork.be (Floris Bruynooghe) Date: Tue, 31 Mar 2015 23:57:16 +0100 Subject: [pytest-dev] moving pytest-timeout to pytest-dev Message-ID: Hi all, If no objections I'd like to move pytest-timeout to the pytest-dev team on bitbucket as well. Regards, Floris -------------- next part -------------- An HTML attachment was scrubbed... URL: From bubenkoff at gmail.com Wed Apr 1 01:37:54 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Wed, 1 Apr 2015 01:37:54 +0200 Subject: [pytest-dev] moving pytest-timeout to pytest-dev In-Reply-To: References: Message-ID: +1 On 1 April 2015 at 00:57, Floris Bruynooghe wrote: > Hi all, > > If no objections I'd like to move pytest-timeout to the pytest-dev team on > bitbucket as well. > > Regards, > Floris > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > > -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Wed Apr 1 03:03:32 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Tue, 31 Mar 2015 22:03:32 -0300 Subject: [pytest-dev] moving pytest-timeout to pytest-dev In-Reply-To: References: Message-ID: +1, certainly :) Em 31/03/2015 20:38, "Anatoly Bubenkov" escreveu: > +1 > > On 1 April 2015 at 00:57, Floris Bruynooghe wrote: > >> Hi all, >> >> If no objections I'd like to move pytest-timeout to the pytest-dev team >> on bitbucket as well. >> >> Regards, >> Floris >> >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev >> >> > > > -- > Anatoly Bubenkov > > _______________________________________________ > 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 holger at merlinux.eu Wed Apr 1 09:21:34 2015 From: holger at merlinux.eu (holger krekel) Date: Wed, 1 Apr 2015 07:21:34 +0000 Subject: [pytest-dev] release checklist / de-monopolizing release process In-Reply-To: References: <20150326131223.GG15735@merlinux.eu> <20150326132323.GH15735@merlinux.eu> <20150327083728.GO15735@merlinux.eu> Message-ID: <20150401072134.GI15735@merlinux.eu> Hi Floris, thanks for the summary. Comments inline. On Tue, Mar 31, 2015 at 23:55 +0100, Floris Bruynooghe wrote: > Hi, > > I started doing inline replying but I think it got confusing. I mostly > agree so far, including with semantic versioning, but would like to > summarise the usage of branches how I think/understand it should work: > > Each release has a release/maintenance branch: pytest-2.6, pytest-2.7 etc. > This is where the next bugfix release is prepared, e.g. 2.7.1. > > The default branch is where the next feature release is prepared, e.g. 2.8. > > Any bug fixes for a release should be committed to these release branches, > once committed there they should be merged to the default branch. I think > whoever merges the pull request is responsible for also merging it into > default. > > Any live website updates should be committed to the last release branch > which should be hooked up to the "latest" doc-install target. At any point > we should be able to install the docs from the last release branch to the > live site. > This does mean sometimes doc changes for a bugfix release appear before the > bugfix is released. Maybe we should address this in the long term by > splitting off the website to a different repo from the docs, so you serve > http://pytest.org separate from http://pytest.org/latest and > http://pytest.org/dev. That way out-of band updates can happen. > > This has a slight influence on the release procedure: When creating a new > feature release one does the final commits to set the doc-install target to > "latest" in a new branch, e.g. pytest-2.8, then tag the release. Once the > release is tagged versions can be bumped in the release branch, e.g. > 2.8.1.dev0 as well as the default branch, e.g. 2.9.0.dev0. The main > downside of all this is that it will produce annoying merge conflicts in > the changelog for bugfixes which we will have to manually resolve every > time. The most complicated thing to handle seems to be documentation. What about automating/simplifying things: - automate setting of version/release in conf.py from setup.py (or include all version-bumpbing code in a extra/set_version.py script) - modify the Makefile to not have a static "SITETARGET" but use the "release" version found in conf.py to determine the target: - X.Y.Z[.devN] will select pytest.org/X.Y as a target - symlink pytest.org/dev to 2.8 and pytest.org/latest to 2.7 and on minor feature release change the symlinks One underlying assumption is all doc changes in the "pytest-2.7" maintenance branch will be bugfixes in the docs and are fine to be seen immediately. There is one concern from my side which is that if we are strict about only letting bugfixes into micro releases we'll end up with two active branches to manage and possibly to release from. As we usually design all changes to be backward-compatible we should retire 2.7-maint as soon as 2.8 is out. If that makes sense i can modify the release-checklist PR accordingly. best, holger > So what this means for the current release-checklist pull-request is that > it could be used to create the pytest-2.7 branch. And then we can bump > versions in default to 2.8.0.dev0. > > Hope that all makes sense. > > > On 27 March 2015 at 08:37, holger krekel wrote: > > > On Thu, Mar 26, 2015 at 19:12 -0300, Bruno Oliveira wrote: > > > > > > This means that even little feature additions or changes in behaviour > > > > would neccessarily need to go to pytest-2.8. In the past, i have > > > > allowed such little additions where i was pretty sure they wouldn't > > break > > > > things into micro releases > > > > > > According to Semantic Versioning, strictly speaking changes in existing > > > behavior would have to bump the minor number (except bugs, which would > > > bump MICRO). Not sure how people feel about it, but some > > > (myself included) like to know that they can safely update a library/tool > > > without having to review your code for usage changes (not that I've ever > > had > > > this problem with pytest, mind you). MAJOR should be updated for > > > backward-incompatible changes, but I don't see that happening anytime > > soon. > > > > > > In the end of the day, I guess just having a couple of guidelines/rules > > in > > > place > > > is that everyone agrees on is good enough. > > > > Note that virtually pytest releases are supposed to be backward compatible. > > And even bug fixes can introduce backward compat problems. > > > > I agree with Bruno that semantic versioning is a nice standard to follow > and people are familiar with it these days. So any bugfixes for 2.7 go to > a pytest-2.7 branch while any new features go into default. I realise that > this means most releases will be 2.X.0 with an occasional 2.X.1 or so and > probably never a 3.X.0, but I think that's perfectly fine. > > > Regards, > Floris -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From flub at devork.be Wed Apr 1 10:43:27 2015 From: flub at devork.be (Floris Bruynooghe) Date: Wed, 1 Apr 2015 09:43:27 +0100 Subject: [pytest-dev] release checklist / de-monopolizing release process In-Reply-To: <20150401072134.GI15735@merlinux.eu> References: <20150326131223.GG15735@merlinux.eu> <20150326132323.GH15735@merlinux.eu> <20150327083728.GO15735@merlinux.eu> <20150401072134.GI15735@merlinux.eu> Message-ID: On 1 April 2015 at 08:21, holger krekel wrote: > Hi Floris, > > thanks for the summary. Comments inline. > > On Tue, Mar 31, 2015 at 23:55 +0100, Floris Bruynooghe wrote: > > Hi, > > > > I started doing inline replying but I think it got confusing. I mostly > > agree so far, including with semantic versioning, but would like to > > summarise the usage of branches how I think/understand it should work: > > > > Each release has a release/maintenance branch: pytest-2.6, pytest-2.7 > etc. > > This is where the next bugfix release is prepared, e.g. 2.7.1. > > > > The default branch is where the next feature release is prepared, e.g. > 2.8. > > > > Any bug fixes for a release should be committed to these release > branches, > > once committed there they should be merged to the default branch. I > think > > whoever merges the pull request is responsible for also merging it into > > default. > > > > Any live website updates should be committed to the last release branch > > which should be hooked up to the "latest" doc-install target. At any > point > > we should be able to install the docs from the last release branch to the > > live site. > > This does mean sometimes doc changes for a bugfix release appear before > the > > bugfix is released. Maybe we should address this in the long term by > > splitting off the website to a different repo from the docs, so you serve > > http://pytest.org separate from http://pytest.org/latest and > > http://pytest.org/dev. That way out-of band updates can happen. > > > > This has a slight influence on the release procedure: When creating a > new > > feature release one does the final commits to set the doc-install target > to > > "latest" in a new branch, e.g. pytest-2.8, then tag the release. Once > the > > release is tagged versions can be bumped in the release branch, e.g. > > 2.8.1.dev0 as well as the default branch, e.g. 2.9.0.dev0. The main > > downside of all this is that it will produce annoying merge conflicts in > > the changelog for bugfixes which we will have to manually resolve every > > time. > > The most complicated thing to handle seems to be documentation. What > about automating/simplifying things: > > - automate setting of version/release in conf.py from setup.py (or > include all version-bumpbing code in a extra/set_version.py script) > > - modify the Makefile to not have a static "SITETARGET" but use the > "release" > version found in conf.py to determine the target: > - X.Y.Z[.devN] will select pytest.org/X.Y as a target > - symlink pytest.org/dev to 2.8 and pytest.org/latest to 2.7 > and on minor feature release change the symlinks > Sounds about right, the only thing I'm not sure is how to (automatically) maintain the symlinks. Or is this something that would end up on the release checklist? > One underlying assumption is all doc changes in the "pytest-2.7" > maintenance > branch will be bugfixes in the docs and are fine to be seen immediately. > > There is one concern from my side which is that if we are strict about > only letting bugfixes into micro releases we'll end up with two active > branches to manage and possibly to release from. As we usually design > all changes to be backward-compatible we should retire 2.7-maint as soon > as 2.8 is out. Yes, given how py.test's backwards compatibility works we can retire pytest-2.7 as soon as 2.8 is released. So only regressions would end up on a release branch normally and the overhead shouldn't be too high (provides an incentive not to make mistakes :-) > > If that makes sense i can modify the release-checklist PR accordingly. > Fine with me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Thu Apr 2 10:57:54 2015 From: holger at merlinux.eu (holger krekel) Date: Thu, 2 Apr 2015 08:57:54 +0000 Subject: [pytest-dev] release checklist / de-monopolizing release process In-Reply-To: References: <20150326131223.GG15735@merlinux.eu> <20150326132323.GH15735@merlinux.eu> <20150327083728.GO15735@merlinux.eu> <20150401072134.GI15735@merlinux.eu> Message-ID: <20150402085754.GV15735@merlinux.eu> Hi Floris, i updated the PR at: https://bitbucket.org/pytest-dev/pytest/pull-request/266/add-a-release-checklist/diff i suggest you merge it with default and then branch off pytest-2.7 and bump the version number for the default branch in _pytest/__init__.py to "2.8.0.dev1". Indeed, the symlinking of "latest", "dev" currently is a manual activity. Also, the release checklist is not totally precise wrt to which branch a release is done from. There are slight differences if you are doing a micro or minor release but i'd like to care about that later (or someone else can). For now, i'd be happy if we merge the release-checklist as it is much better than not having documented anything about the release process :) holger On Wed, Apr 01, 2015 at 09:43 +0100, Floris Bruynooghe wrote: > On 1 April 2015 at 08:21, holger krekel wrote: > > > Hi Floris, > > > > thanks for the summary. Comments inline. > > > > On Tue, Mar 31, 2015 at 23:55 +0100, Floris Bruynooghe wrote: > > > Hi, > > > > > > I started doing inline replying but I think it got confusing. I mostly > > > agree so far, including with semantic versioning, but would like to > > > summarise the usage of branches how I think/understand it should work: > > > > > > Each release has a release/maintenance branch: pytest-2.6, pytest-2.7 > > etc. > > > This is where the next bugfix release is prepared, e.g. 2.7.1. > > > > > > The default branch is where the next feature release is prepared, e.g. > > 2.8. > > > > > > Any bug fixes for a release should be committed to these release > > branches, > > > once committed there they should be merged to the default branch. I > > think > > > whoever merges the pull request is responsible for also merging it into > > > default. > > > > > > Any live website updates should be committed to the last release branch > > > which should be hooked up to the "latest" doc-install target. At any > > point > > > we should be able to install the docs from the last release branch to the > > > live site. > > > This does mean sometimes doc changes for a bugfix release appear before > > the > > > bugfix is released. Maybe we should address this in the long term by > > > splitting off the website to a different repo from the docs, so you serve > > > http://pytest.org separate from http://pytest.org/latest and > > > http://pytest.org/dev. That way out-of band updates can happen. > > > > > > This has a slight influence on the release procedure: When creating a > > new > > > feature release one does the final commits to set the doc-install target > > to > > > "latest" in a new branch, e.g. pytest-2.8, then tag the release. Once > > the > > > release is tagged versions can be bumped in the release branch, e.g. > > > 2.8.1.dev0 as well as the default branch, e.g. 2.9.0.dev0. The main > > > downside of all this is that it will produce annoying merge conflicts in > > > the changelog for bugfixes which we will have to manually resolve every > > > time. > > > > The most complicated thing to handle seems to be documentation. What > > about automating/simplifying things: > > > > - automate setting of version/release in conf.py from setup.py (or > > include all version-bumpbing code in a extra/set_version.py script) > > > > - modify the Makefile to not have a static "SITETARGET" but use the > > "release" > > version found in conf.py to determine the target: > > - X.Y.Z[.devN] will select pytest.org/X.Y as a target > > - symlink pytest.org/dev to 2.8 and pytest.org/latest to 2.7 > > and on minor feature release change the symlinks > > > > Sounds about right, the only thing I'm not sure is how to (automatically) > maintain the symlinks. Or is this something that would end up on the > release checklist? > > > > One underlying assumption is all doc changes in the "pytest-2.7" > > maintenance > > branch will be bugfixes in the docs and are fine to be seen immediately. > > > > There is one concern from my side which is that if we are strict about > > only letting bugfixes into micro releases we'll end up with two active > > branches to manage and possibly to release from. As we usually design > > all changes to be backward-compatible we should retire 2.7-maint as soon > > as 2.8 is out. > > > Yes, given how py.test's backwards compatibility works we can retire > pytest-2.7 as soon as 2.8 is released. So only regressions would end up on > a release branch normally and the overhead shouldn't be too high (provides > an incentive not to make mistakes :-) > > > > > If that makes sense i can modify the release-checklist PR accordingly. > > > > Fine with me. -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From dpb.mediamath at gmail.com Thu Apr 2 23:21:40 2015 From: dpb.mediamath at gmail.com (dpb dpb) Date: Thu, 2 Apr 2015 17:21:40 -0400 Subject: [pytest-dev] pass a collection of function arguments to Pytest at the command line Message-ID: Is there a way to pass a collection of function arguments to Pytest at the command line so as to take the place of parameters being passed by the parametrize decorator? Sometimes one set of parameters, out of a large collection, causes tests to fail but only intermittently. Without rewriting the tests I'd like to pass just that set of parameters again from the command line. Thanks. - dpb -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Fri Apr 3 19:03:49 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Fri, 3 Apr 2015 14:03:49 -0300 Subject: [pytest-dev] yield_fixture experimental status Message-ID: Hi all, yield_fixture is still listed as experimental in the docs ( http://pytest.org/latest/yieldfixture.html). Do we still want to discuss/change it, or should we drop the "experimental" status from the documentation? Myself love it, and use it almost exclusively when I want to write a fixture that needs a tear down step. :) Cheers, -------------- next part -------------- An HTML attachment was scrubbed... URL: From bubenkoff at gmail.com Fri Apr 3 19:36:31 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Fri, 3 Apr 2015 19:36:31 +0200 Subject: [pytest-dev] yield_fixture experimental status In-Reply-To: References: Message-ID: I think it's just a leftover in the docs Yield_fixture is de facto standard :) On Apr 3, 2015 7:04 PM, "Bruno Oliveira" wrote: > Hi all, > > yield_fixture is still listed as experimental in the docs ( > http://pytest.org/latest/yieldfixture.html). Do we still want to > discuss/change it, or should we drop the "experimental" status from the > documentation? > > Myself love it, and use it almost exclusively when I want to write a > fixture that needs a tear down step. :) > > Cheers, > > _______________________________________________ > 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 3 21:32:42 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Fri, 3 Apr 2015 16:32:42 -0300 Subject: [pytest-dev] yield_fixture experimental status In-Reply-To: References: Message-ID: Great! Created a PR at https://bitbucket.org/pytest-dev/pytest/pull-request/267. Cheers, On Fri, Apr 3, 2015 at 2:36 PM, Anatoly Bubenkov wrote: > I think it's just a leftover in the docs > Yield_fixture is de facto standard :) > On Apr 3, 2015 7:04 PM, "Bruno Oliveira" wrote: > >> Hi all, >> >> yield_fixture is still listed as experimental in the docs ( >> http://pytest.org/latest/yieldfixture.html). Do we still want to >> discuss/change it, or should we drop the "experimental" status from the >> documentation? >> >> Myself love it, and use it almost exclusively when I want to write a >> fixture that needs a tear down step. :) >> >> Cheers, >> >> _______________________________________________ >> 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 sandhu.jasmine at gmail.com Fri Apr 3 21:59:19 2015 From: sandhu.jasmine at gmail.com (Jasmine Sandhu) Date: Fri, 3 Apr 2015 12:59:19 -0700 Subject: [pytest-dev] how to see print statements with -s flag Message-ID: Hi, I generally do print statements or step through the debugger in Eclipse/PyDev to understand how something works. However, with pytest_xdist I'm not yet able to see the print statements with the -s flag. This shows print statements: $ py.test -v -s This does not: $ py.test -v -s -n 4 How do I see the print statements embedded in my tests? Thanks, jasmine -------------- next part -------------- An HTML attachment was scrubbed... URL: From christianzlong2 at gmail.com Sat Apr 4 22:18:47 2015 From: christianzlong2 at gmail.com (Christian Long) Date: Sat, 4 Apr 2015 15:18:47 -0500 Subject: [pytest-dev] PyCon participation Message-ID: I will be at PyCon April 10 to 15. For the sprints, I will be working on Arkestra, my project for Adopt Pytest Month. Will any other pytest contributors be at the sprints? We can add Adopt Pytest Month to the list of projects that will be sprinting. https://us.pycon.org/2015/community/sprints/ I hope to see you there. Christian Long From edisongustavo at gmail.com Mon Apr 6 15:37:28 2015 From: edisongustavo at gmail.com (Edison Gustavo Muenz) Date: Mon, 6 Apr 2015 10:37:28 -0300 Subject: [pytest-dev] Failure to create representation with sets having "unsortable" elements Message-ID: Hello all, I?m using Python 2.7.7 (The error also happens on Python 2.7.9) The following code fails: def test_pretty_printer_screws_up_representation(): class UnsortableKey(object): def __init__(self, name): self.name = name def __lt__(self, other): raise RuntimeError() def __repr__(self): return self.name def __hash__(self): return hash(self.name) def __eq__(self, other): return self.name == other.name assert {UnsortableKey('1'), UnsortableKey('2')} == {UnsortableKey('2')} > assert {UnsortableKey('1'), UnsortableKey('2')} == {UnsortableKey('2')} E assert set([1, 2]) == set([2]) E (pytest_assertion plugin: representation of details failed. Probably an object has a faulty __repr__.) E X:\etk\coilib50\source\python\coilib50\_pytest\_tests\pytest_almost_equal.py:766: RuntimeError While debugging, the problem happens in this line of pprint.py (The PrettyPrinter module). It assumes that the ?object? can have the method sorted() called on it, which is not always true. The repr.py module handles this correctly, but pprint.py doesn?t. This is the full traceback (I printed it from the the __lt__() method). I think that this should be handled by pprint.py, however, it is tied to the python version being used. Maybe pytest could handle this as a workaround this limitation of pprint.py? Fixing it in pprint.py looks straightforward: just handle it like repr.py does, by using the _possiblysorted() method. Thoughts? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From flub at devork.be Wed Apr 8 00:17:49 2015 From: flub at devork.be (Floris Bruynooghe) Date: Tue, 7 Apr 2015 23:17:49 +0100 Subject: [pytest-dev] pass a collection of function arguments to Pytest at the command line In-Reply-To: References: Message-ID: Hi, On 2 April 2015 at 22:21, dpb dpb wrote: > > Is there a way to pass a collection of function arguments to Pytest at the command line so as to take the place of parameters being passed by the parametrize decorator? > > Sometimes one set of parameters, out of a large collection, causes tests to fail but only intermittently. Without rewriting the tests I'd like to pass just that set of parameters again from the command line. This is not directly integrated with the normal parametrisation. However there is an example that achieves what you are asking for: http://pytest.org/latest/parametrize.html#basic-pytest-generate-tests-example Hope that helps. Regards, Floris -------------- next part -------------- An HTML attachment was scrubbed... URL: From flub at devork.be Wed Apr 8 00:23:25 2015 From: flub at devork.be (Floris Bruynooghe) Date: Tue, 7 Apr 2015 23:23:25 +0100 Subject: [pytest-dev] Failure to create representation with sets having "unsortable" elements In-Reply-To: References: Message-ID: Hi, Interesting case, but I would say we should treat it as a bug in py.test and manage to handle this or at least fall back gracefully. So could you please create an issue at https://bitbucket.org/pytest-dev/pytest/issues/new and include all the information you provided here directly in the issue (i.e. the unsortable object and the traceback). Thanks! Floris On 6 April 2015 at 14:37, Edison Gustavo Muenz wrote: > Hello all, > > I?m using Python 2.7.7 (The error also happens on Python 2.7.9) > > The following code fails: > > def test_pretty_printer_screws_up_representation(): > class UnsortableKey(object): > def __init__(self, name): > self.name = name > > def __lt__(self, other): > raise RuntimeError() > > def __repr__(self): > return self.name > > def __hash__(self): > return hash(self.name) > > def __eq__(self, other): > return self.name == other.name > > assert {UnsortableKey('1'), UnsortableKey('2')} == {UnsortableKey('2')} > > > assert {UnsortableKey('1'), UnsortableKey('2')} == {UnsortableKey('2')} > E assert set([1, 2]) == set([2]) > E (pytest_assertion plugin: representation of details failed. Probably an object has a faulty __repr__.) > E X:\etk\coilib50\source\python\coilib50\_pytest\_tests\pytest_almost_equal.py:766: RuntimeError > > While debugging, the problem happens in this line > of > pprint.py (The PrettyPrinter module). > > It assumes that the ?object? can have the method sorted() called on it, > which is not always true. The repr.py module handles this correctly, but > pprint.py doesn?t. > > This is the full traceback (I printed it > from the the __lt__() method). > > I think that this should be handled by pprint.py, however, it is tied to > the python version being used. Maybe pytest could handle this as a > workaround this limitation of pprint.py? > > Fixing it in pprint.py looks straightforward: just handle it like repr.py > does, by using the _possiblysorted() method. > > Thoughts? > ? > > _______________________________________________ > 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 tibor.arpas at infinit.sk Wed Apr 8 10:46:30 2015 From: tibor.arpas at infinit.sk (Tibor Arpas) Date: Wed, 8 Apr 2015 10:46:30 +0200 Subject: [pytest-dev] pytest testmon Message-ID: Hi, could you guys try the recent version of testmon and let me know what works and doesn't work for you? pytest testmon is a py.test plugin which only selects and executes tests affected by recent changes based on coverage.py information usage: pip install testmon py.test --testmon py.test --by-test-count # to print modules sorted by count of tests which reach them # do some changes in your source code (so that the syntax tree changes) py.test --testmon github: https://github.com/tarpas/testmon/ Known issues: chaotic/no documentation minimal feature-set in general no subprocess support (which degrades pytest's test suite running quite a bit) poor test suite That is not to discourage everybody, it's a wonderful tool already! :) Tibor -------------- next part -------------- An HTML attachment was scrubbed... URL: From bubenkoff at gmail.com Fri Apr 10 16:16:50 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Fri, 10 Apr 2015 16:16:50 +0200 Subject: [pytest-dev] CI on windows Message-ID: Nice service, looks like https://ci.appveyor.com/login i added py, pytest, pytest-xdist already does anyone has experience with testing pytest stuff on windows to help me with setting it up? -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at the-compiler.org Fri Apr 10 16:29:55 2015 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 10 Apr 2015 16:29:55 +0200 Subject: [pytest-dev] CI on windows In-Reply-To: References: Message-ID: <20150410142955.GA1788@tonks> * Anatoly Bubenkov [2015-04-10 16:16:50 +0200]: > Nice service, looks like > > https://ci.appveyor.com/login > > i added py, pytest, pytest-xdist already > > does anyone has experience with testing pytest stuff on windows to help me > with setting it up? Not sure how much I can help, but I have a project tested via pytest on Windows - though with my own buildbot[1], not via AppVeyor. (why, you ask? I need to have it anyways because Travis/drone.io/... have old distributions, so I can't get a recent version of Qt/PyQt easily - and since it runs anyways, I might as well run Windows in there as well) Florian [1] http://qutebrowser.org:8010/waterfall -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From nicoddemus at gmail.com Fri Apr 10 16:37:36 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Fri, 10 Apr 2015 11:37:36 -0300 Subject: [pytest-dev] CI on windows In-Reply-To: References: Message-ID: Hey Anatoly, I develop mostly on Windows, so I might be able to help. Cheers, On Fri, Apr 10, 2015 at 11:16 AM, Anatoly Bubenkov wrote: > Nice service, looks like > > https://ci.appveyor.com/login > > i added py, pytest, pytest-xdist already > > does anyone has experience with testing pytest stuff on windows to help me > with setting it up? > > -- > Anatoly Bubenkov > > _______________________________________________ > 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 bubenkoff at gmail.com Fri Apr 10 16:57:59 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Fri, 10 Apr 2015 16:57:59 +0200 Subject: [pytest-dev] CI on windows In-Reply-To: References: Message-ID: @holger, can you please create an account there and add everyone to the team? they have somewhat strange approach, you create an account and then it can be a team as well On 10 April 2015 at 16:16, Anatoly Bubenkov wrote: > Nice service, looks like > > https://ci.appveyor.com/login > > i added py, pytest, pytest-xdist already > > does anyone has experience with testing pytest stuff on windows to help me > with setting it up? > > -- > Anatoly Bubenkov > -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From christianzlong2 at gmail.com Fri Apr 10 17:19:17 2015 From: christianzlong2 at gmail.com (Christian Long) Date: Fri, 10 Apr 2015 10:19:17 -0500 Subject: [pytest-dev] CI on windows In-Reply-To: References: Message-ID: Please add me there as well. I can offer some help with getting things set up on Windows. On Fri, Apr 10, 2015 at 9:57 AM, Anatoly Bubenkov wrote: > @holger, can you please create an account there and add everyone to the > team? > they have somewhat strange approach, you create an account and then it can > be a team as well > > On 10 April 2015 at 16:16, Anatoly Bubenkov wrote: >> >> Nice service, looks like >> >> https://ci.appveyor.com/login >> >> i added py, pytest, pytest-xdist already >> >> does anyone has experience with testing pytest stuff on windows to help me >> with setting it up? >> >> -- >> Anatoly Bubenkov > > > > > -- > Anatoly Bubenkov > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > From holger at merlinux.eu Fri Apr 10 18:59:53 2015 From: holger at merlinux.eu (holger krekel) Date: Fri, 10 Apr 2015 16:59:53 +0000 Subject: [pytest-dev] CI on windows In-Reply-To: References: Message-ID: <20150410165953.GA15735@merlinux.eu> On Fri, Apr 10, 2015 at 16:57 +0200, Anatoly Bubenkov wrote: > @holger, can you please create an account there and add everyone to the > team? > they have somewhat strange approach, you create an account and then it can > be a team as well Feel free to do it yourself or must i be involved initially? Myself, I actually have a free Rackspace account (they gave it to me to support Open Source) where i am using a Windows machine an run "devpi test X" when doing releases. I gave Floris and maybe others access IIRC. holger > On 10 April 2015 at 16:16, Anatoly Bubenkov wrote: > > > Nice service, looks like > > > > https://ci.appveyor.com/login > > > > i added py, pytest, pytest-xdist already > > > > does anyone has experience with testing pytest stuff on windows to help me > > with setting it up? > > > > -- > > Anatoly Bubenkov > > > > > > -- > Anatoly Bubenkov > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From bubenkoff at gmail.com Fri Apr 10 19:10:03 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Fri, 10 Apr 2015 19:10:03 +0200 Subject: [pytest-dev] CI on windows In-Reply-To: <20150410165953.GA15735@merlinux.eu> References: <20150410165953.GA15735@merlinux.eu> Message-ID: We need a 'central' account and you seem the best obviously :) Rackspace host is just a machine but this is a full featured service with hooks and notifications like drone On Apr 10, 2015 6:59 PM, "holger krekel" wrote: > On Fri, Apr 10, 2015 at 16:57 +0200, Anatoly Bubenkov wrote: > > @holger, can you please create an account there and add everyone to the > > team? > > they have somewhat strange approach, you create an account and then it > can > > be a team as well > > Feel free to do it yourself or must i be involved initially? > > Myself, I actually have a free Rackspace account (they gave it to me to > support > Open Source) where i am using a Windows machine an run "devpi test X" when > doing releases. I gave Floris and maybe others access IIRC. > > holger > > > > On 10 April 2015 at 16:16, Anatoly Bubenkov wrote: > > > > > Nice service, looks like > > > > > > https://ci.appveyor.com/login > > > > > > i added py, pytest, pytest-xdist already > > > > > > does anyone has experience with testing pytest stuff on windows to > help me > > > with setting it up? > > > > > > -- > > > Anatoly Bubenkov > > > > > > > > > > > -- > > Anatoly Bubenkov > > > _______________________________________________ > > pytest-dev mailing list > > pytest-dev at python.org > > https://mail.python.org/mailman/listinfo/pytest-dev > > > -- > about me: http://holgerkrekel.net/about-me/ > contracting: http://merlinux.eu > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bubenkoff at gmail.com Sat Apr 11 03:49:59 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Sat, 11 Apr 2015 03:49:59 +0200 Subject: [pytest-dev] CI on windows In-Reply-To: References: <20150410165953.GA15735@merlinux.eu> Message-ID: nice project, can be useful indeed Im not sure if drone.io has virtualbox and vagrant available though On 11 April 2015 at 03:46, Marc Abramowitz wrote: > I've been working on Vagrant VMs with a super small install of Windows (a > free and small Windows derivative called Hyper-V Server 2012 R2). Here's > one with Python 2 + pip + virtualenv + tox, etc. > > https://github.com/msabramo/vagrant_hyperv_python2 > > Does that help at all? > > I've heard that Appveyor is nice but it takes a very long time to run > builds so it's frustrating to use it for building PRs. > > -Marc > http://marc-abramowitz.com > Sent from my iPhone 4S > > > On Apr 10, 2015, at 10:10 AM, Anatoly Bubenkov > wrote: > > We need a 'central' account and you seem the best obviously :) > Rackspace host is just a machine but this is a full featured service with > hooks and notifications like drone > On Apr 10, 2015 6:59 PM, "holger krekel" wrote: > >> On Fri, Apr 10, 2015 at 16:57 +0200, Anatoly Bubenkov wrote: >> > @holger, can you please create an account there and add everyone to the >> > team? >> > they have somewhat strange approach, you create an account and then it >> can >> > be a team as well >> >> Feel free to do it yourself or must i be involved initially? >> >> Myself, I actually have a free Rackspace account (they gave it to me to >> support >> Open Source) where i am using a Windows machine an run "devpi test X" when >> doing releases. I gave Floris and maybe others access IIRC. >> >> holger >> >> >> > On 10 April 2015 at 16:16, Anatoly Bubenkov >> wrote: >> > >> > > Nice service, looks like >> > > >> > > https://ci.appveyor.com/login >> > > >> > > i added py, pytest, pytest-xdist already >> > > >> > > does anyone has experience with testing pytest stuff on windows to >> help me >> > > with setting it up? >> > > >> > > -- >> > > Anatoly Bubenkov >> > > >> > >> > >> > >> > -- >> > Anatoly Bubenkov >> >> > _______________________________________________ >> > pytest-dev mailing list >> > pytest-dev at python.org >> > https://mail.python.org/mailman/listinfo/pytest-dev >> >> >> -- >> about me: http://holgerkrekel.net/about-me/ >> contracting: http://merlinux.eu >> > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > > -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From bubenkoff at gmail.com Sat Apr 11 03:54:17 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Sat, 11 Apr 2015 03:54:17 +0200 Subject: [pytest-dev] CI on windows In-Reply-To: References: Message-ID: tried your email - christianzlong2 at gmail.com it says there's no such On 10 April 2015 at 17:19, Christian Long wrote: > Please add me there as well. I can offer some help with getting things > set up on Windows. > > On Fri, Apr 10, 2015 at 9:57 AM, Anatoly Bubenkov > wrote: > > @holger, can you please create an account there and add everyone to the > > team? > > they have somewhat strange approach, you create an account and then it > can > > be a team as well > > > > On 10 April 2015 at 16:16, Anatoly Bubenkov wrote: > >> > >> Nice service, looks like > >> > >> https://ci.appveyor.com/login > >> > >> i added py, pytest, pytest-xdist already > >> > >> does anyone has experience with testing pytest stuff on windows to help > me > >> with setting it up? > >> > >> -- > >> Anatoly Bubenkov > > > > > > > > > > -- > > Anatoly Bubenkov > > > > _______________________________________________ > > pytest-dev mailing list > > pytest-dev at python.org > > https://mail.python.org/mailman/listinfo/pytest-dev > > > -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From msabramo at gmail.com Sat Apr 11 03:46:18 2015 From: msabramo at gmail.com (Marc Abramowitz) Date: Fri, 10 Apr 2015 18:46:18 -0700 Subject: [pytest-dev] CI on windows In-Reply-To: References: <20150410165953.GA15735@merlinux.eu> Message-ID: I've been working on Vagrant VMs with a super small install of Windows (a free and small Windows derivative called Hyper-V Server 2012 R2). Here's one with Python 2 + pip + virtualenv + tox, etc. https://github.com/msabramo/vagrant_hyperv_python2 Does that help at all? I've heard that Appveyor is nice but it takes a very long time to run builds so it's frustrating to use it for building PRs. -Marc http://marc-abramowitz.com Sent from my iPhone 4S > On Apr 10, 2015, at 10:10 AM, Anatoly Bubenkov wrote: > > We need a 'central' account and you seem the best obviously :) > Rackspace host is just a machine but this is a full featured service with hooks and notifications like drone > >> On Apr 10, 2015 6:59 PM, "holger krekel" wrote: >> On Fri, Apr 10, 2015 at 16:57 +0200, Anatoly Bubenkov wrote: >> > @holger, can you please create an account there and add everyone to the >> > team? >> > they have somewhat strange approach, you create an account and then it can >> > be a team as well >> >> Feel free to do it yourself or must i be involved initially? >> >> Myself, I actually have a free Rackspace account (they gave it to me to support >> Open Source) where i am using a Windows machine an run "devpi test X" when >> doing releases. I gave Floris and maybe others access IIRC. >> >> holger >> >> >> > On 10 April 2015 at 16:16, Anatoly Bubenkov wrote: >> > >> > > Nice service, looks like >> > > >> > > https://ci.appveyor.com/login >> > > >> > > i added py, pytest, pytest-xdist already >> > > >> > > does anyone has experience with testing pytest stuff on windows to help me >> > > with setting it up? >> > > >> > > -- >> > > Anatoly Bubenkov >> > > >> > >> > >> > >> > -- >> > Anatoly Bubenkov >> >> > _______________________________________________ >> > pytest-dev mailing list >> > pytest-dev at python.org >> > https://mail.python.org/mailman/listinfo/pytest-dev >> >> >> -- >> about me: http://holgerkrekel.net/about-me/ >> contracting: http://merlinux.eu > _______________________________________________ > 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 janne.vanhala at gmail.com Sat Apr 11 11:32:39 2015 From: janne.vanhala at gmail.com (Janne Vanhala) Date: Sat, 11 Apr 2015 02:32:39 -0700 (PDT) Subject: [pytest-dev] Moving pytest-instafail under pytest-dev organization Message-ID: <1428744759404.c51fc999@Nodemailer> Hi all, I?d like to move pytest-instafail (https://github.com/jpvanhal/pytest-instafail) under pytest-dev organization in Github. - Janne -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas at pelme.se Sun Apr 12 09:32:24 2015 From: andreas at pelme.se (Andreas Pelme) Date: Sun, 12 Apr 2015 09:32:24 +0200 Subject: [pytest-dev] Moving pytest-instafail under pytest-dev organization In-Reply-To: <1428744759404.c51fc999@Nodemailer> References: <1428744759404.c51fc999@Nodemailer> Message-ID: +1 It has all the required things in the checklist (PyPI presence, LICENSE, README, setup.py, tox) I use it all the time, great plugin! :-) /Andreas > On 11 apr 2015, at 11:32, Janne Vanhala wrote: > > Hi all, > > I?d like to move pytest-instafail (https://github.com/jpvanhal/pytest-instafail) under pytest-dev organization in Github. > > - Janne > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From nicoddemus at gmail.com Sun Apr 12 17:01:26 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Sun, 12 Apr 2015 12:01:26 -0300 Subject: [pytest-dev] Moving pytest-instafail under pytest-dev organization In-Reply-To: References: <1428744759404.c51fc999@Nodemailer> Message-ID: You should already have all required permissions Janne, so please go ahead. :) Cheers, On Sun, Apr 12, 2015 at 4:32 AM, Andreas Pelme wrote: > +1 > > It has all the required things in the checklist (PyPI presence, LICENSE, > README, setup.py, tox) > > I use it all the time, great plugin! :-) > > /Andreas > > > > On 11 apr 2015, at 11:32, Janne Vanhala wrote: > > > > Hi all, > > > > I?d like to move pytest-instafail ( > https://github.com/jpvanhal/pytest-instafail) under pytest-dev > organization in Github. > > > > - Janne > > > > _______________________________________________ > > 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 janne.vanhala at gmail.com Sun Apr 12 17:58:20 2015 From: janne.vanhala at gmail.com (Janne Vanhala) Date: Sun, 12 Apr 2015 08:58:20 -0700 (PDT) Subject: [pytest-dev] Moving pytest-instafail under pytest-dev organization In-Reply-To: References: Message-ID: <1428854300123.6578ce56@Nodemailer> Cool, thanks! I transferred the repo over to Anatoly since you need to be an organization admin to transfer the repo to the organization. On Sun, Apr 12, 2015 at 6:01 PM, Bruno Oliveira wrote: > You should already have all required permissions Janne, so please go ahead. > :) > Cheers, > On Sun, Apr 12, 2015 at 4:32 AM, Andreas Pelme wrote: >> +1 >> >> It has all the required things in the checklist (PyPI presence, LICENSE, >> README, setup.py, tox) >> >> I use it all the time, great plugin! :-) >> >> /Andreas >> >> >> > On 11 apr 2015, at 11:32, Janne Vanhala wrote: >> > >> > Hi all, >> > >> > I?d like to move pytest-instafail ( >> https://github.com/jpvanhal/pytest-instafail) under pytest-dev >> organization in Github. >> > >> > - Janne >> > >> > _______________________________________________ >> > 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 flub at devork.be Mon Apr 13 01:41:38 2015 From: flub at devork.be (Floris Bruynooghe) Date: Mon, 13 Apr 2015 00:41:38 +0100 Subject: [pytest-dev] Branches and pull request workflow Message-ID: Hi all, I've just been merging a few pull requests using the new workflow and it seems to work fine: - Accept the PR into pytest-2.7 - Add changelog etc if required - Merge into default I also experimented a bit with squashing commits as discussed at fosdem but I'll leave that for later (needs an extension now and need to test how bitbucket behaves). However I'd like to discuss a bit more about branches. Currently it seems we have a mix of how branches are managed. We have a bunch of branches in pytest-dev/pytest some of which are feature branches, some of which bug-fix branches, some maintenance branches, some complete and waiting on the PR to be accepted and some forgotten to be closed from old PRs. This is quite confusing when looking at the output of `branches` or `heads`, something I do a lot when manually merging. I think it would be nice to keep only the "default" and "pytest-2.X" branches around, that way we should normally only have 2 heads and branches around in the main repo (the old maintenance branches can be closed). This is much simpler to understand what's going on. It would mean all feature or bugfix branches should live on people's personal repositories. Personally I already do this so don't find this a hassle. What would you all think of working this way? Floris -------------- next part -------------- An HTML attachment was scrubbed... URL: From bubenkoff at gmail.com Mon Apr 13 08:49:05 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Mon, 13 Apr 2015 08:49:05 +0200 Subject: [pytest-dev] Branches and pull request workflow In-Reply-To: References: Message-ID: to leave feature branches in people's repo only, you need to manually import diffs instead of merging, otherwise branch will be automatically transfered to main repo or may be you mean that after merging feature branch is closed immediately, but the branch is still there, just marked as closed On 13 April 2015 at 01:41, Floris Bruynooghe wrote: > Hi all, > > I've just been merging a few pull requests using the new workflow and it > seems to work fine: > > - Accept the PR into pytest-2.7 > - Add changelog etc if required > - Merge into default > > I also experimented a bit with squashing commits as discussed at fosdem > but I'll leave that for later (needs an extension now and need to test how > bitbucket behaves). However I'd like to discuss a bit more about branches. > > Currently it seems we have a mix of how branches are managed. We have a > bunch of branches in pytest-dev/pytest some of which are feature branches, > some of which bug-fix branches, some maintenance branches, some complete > and waiting on the PR to be accepted and some forgotten to be closed from > old PRs. This is quite confusing when looking at the output of `branches` > or `heads`, something I do a lot when manually merging. I think it would > be nice to keep only the "default" and "pytest-2.X" branches around, that > way we should normally only have 2 heads and branches around in the main > repo (the old maintenance branches can be closed). This is much simpler to > understand what's going on. > > It would mean all feature or bugfix branches should live on people's > personal repositories. Personally I already do this so don't find this a > hassle. What would you all think of working this way? > > > Floris > > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev > > -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From flub at devork.be Mon Apr 13 09:51:32 2015 From: flub at devork.be (Floris Bruynooghe) Date: Mon, 13 Apr 2015 08:51:32 +0100 Subject: [pytest-dev] Branches and pull request workflow In-Reply-To: References: Message-ID: Hi, On 13 April 2015 at 07:49, Anatoly Bubenkov wrote: > > to leave feature branches in people's repo only, you need to manually import diffs instead of merging, otherwise branch will be automatically transfered to main repo > or may be you mean that after merging feature branch is closed immediately, but the branch is still there, just marked as closed Yes, upon merging the feature branch gets into the main repo but it should indeed be immediately closed there. Currently there's a number of branches and not immediately clear which ones are meant to be there and which ones where not closed but should have been. (Personally I'd argue for using bookmarks rather then branches but due to bitbucket's poor support of them I was alone in that position last time.) Floris -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Mon Apr 13 10:02:12 2015 From: holger at merlinux.eu (holger krekel) Date: Mon, 13 Apr 2015 08:02:12 +0000 Subject: [pytest-dev] Branches and pull request workflow In-Reply-To: References: Message-ID: <20150413080212.GF15735@merlinux.eu> Hi Floris, I am one of the persons (the other one Ronny i guess) who do branches in the main repo. I can shift to my personal repo for this but probably shouldn't use "hpk42/pytest" for a while, right? That was the original location and people might get confused if they missed the moving to pytest-dev. As to bookmarks i have no experience but i do like and support the idea of squashing, i.e. having single commits merged at the end of a PR review. best, holger On Mon, Apr 13, 2015 at 08:51 +0100, Floris Bruynooghe wrote: > Hi, > > On 13 April 2015 at 07:49, Anatoly Bubenkov wrote: > > > > to leave feature branches in people's repo only, you need to manually > import diffs instead of merging, otherwise branch will be automatically > transfered to main repo > > or may be you mean that after merging feature branch is closed > immediately, but the branch is still there, just marked as closed > > > Yes, upon merging the feature branch gets into the main repo but it should > indeed be immediately closed there. Currently there's a number of branches > and not immediately clear which ones are meant to be there and which ones > where not closed but should have been. > > (Personally I'd argue for using bookmarks rather then branches but due to > bitbucket's poor support of them I was alone in that position last time.) > > > Floris > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From edisongustavo at gmail.com Mon Apr 13 14:22:54 2015 From: edisongustavo at gmail.com (Edison Gustavo Muenz) Date: Mon, 13 Apr 2015 09:22:54 -0300 Subject: [pytest-dev] Failure to create representation with sets having "unsortable" elements In-Reply-To: References: Message-ID: Done: https://bitbucket.org/pytest-dev/pytest/issue/718/failure-to-create-representation-with-sets On Tue, Apr 7, 2015 at 7:23 PM, Floris Bruynooghe wrote: > Hi, > > Interesting case, but I would say we should treat it as a bug in py.test > and manage to handle this or at least fall back gracefully. So could you > please create an issue at > https://bitbucket.org/pytest-dev/pytest/issues/new and include all the > information you provided here directly in the issue (i.e. the unsortable > object and the traceback). > > Thanks! > Floris > > > On 6 April 2015 at 14:37, Edison Gustavo Muenz > wrote: > >> Hello all, >> >> I?m using Python 2.7.7 (The error also happens on Python 2.7.9) >> >> The following code fails: >> >> def test_pretty_printer_screws_up_representation(): >> class UnsortableKey(object): >> def __init__(self, name): >> self.name = name >> >> def __lt__(self, other): >> raise RuntimeError() >> >> def __repr__(self): >> return self.name >> >> def __hash__(self): >> return hash(self.name) >> >> def __eq__(self, other): >> return self.name == other.name >> >> assert {UnsortableKey('1'), UnsortableKey('2')} == {UnsortableKey('2')} >> >> > assert {UnsortableKey('1'), UnsortableKey('2')} == {UnsortableKey('2')} >> E assert set([1, 2]) == set([2]) >> E (pytest_assertion plugin: representation of details failed. Probably an object has a faulty __repr__.) >> E X:\etk\coilib50\source\python\coilib50\_pytest\_tests\pytest_almost_equal.py:766: RuntimeError >> >> While debugging, the problem happens in this line >> of >> pprint.py (The PrettyPrinter module). >> >> It assumes that the ?object? can have the method sorted() called on it, >> which is not always true. The repr.py module handles this correctly, but >> pprint.py doesn?t. >> >> This is the full traceback (I printed it >> from the the __lt__() method). >> >> I think that this should be handled by pprint.py, however, it is tied to >> the python version being used. Maybe pytest could handle this as a >> workaround this limitation of pprint.py? >> >> Fixing it in pprint.py looks straightforward: just handle it like repr.py >> does, by using the _possiblysorted() method. >> >> Thoughts? >> ? >> >> _______________________________________________ >> 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 holger at merlinux.eu Tue Apr 14 09:33:46 2015 From: holger at merlinux.eu (holger krekel) Date: Tue, 14 Apr 2015 07:33:46 +0000 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today Message-ID: <20150414073346.GP15735@merlinux.eu> Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, Today the CFP for EP2015 in Bilbao ends. Did you submit talks? I am pondering something pytest or tox or devpi related, maybe a training. I'd like to make sure we don't overlap too much or even complement each other. best, holger From bubenkoff at gmail.com Tue Apr 14 09:35:30 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Tue, 14 Apr 2015 09:35:30 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: <20150414073346.GP15735@merlinux.eu> References: <20150414073346.GP15735@merlinux.eu> Message-ID: I skip ep this year Have fun there everyone! On Apr 14, 2015 9:33 AM, "holger krekel" wrote: > Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, > > Today the CFP for EP2015 in Bilbao ends. Did you submit talks? > I am pondering something pytest or tox or devpi related, maybe a training. > I'd like to make sure we don't overlap too much or even complement each > other. > > best, > holger > _______________________________________________ > 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 brianna.laugher at gmail.com Tue Apr 14 10:24:57 2015 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Tue, 14 Apr 2015 10:24:57 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: <20150414073346.GP15735@merlinux.eu> References: <20150414073346.GP15735@merlinux.eu> Message-ID: I would like to submit something (assuming submissions close at the end of today), about adopt pytest month. But I am not sure if to put more of a technical focus (tidbits in applying pytest to existing projects with legacy or no tests), or community/process, or a mix. Brianna On 14/04/2015 9:33 AM, "holger krekel" wrote: > Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, > > Today the CFP for EP2015 in Bilbao ends. Did you submit talks? > I am pondering something pytest or tox or devpi related, maybe a training. > I'd like to make sure we don't overlap too much or even complement each > other. > > best, > holger > _______________________________________________ > 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 Tue Apr 14 10:36:06 2015 From: me at the-compiler.org (Florian Bruhin) Date: Tue, 14 Apr 2015 10:36:06 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: References: <20150414073346.GP15735@merlinux.eu> Message-ID: <20150414083606.GH1788@tonks> * Brianna Laugher [2015-04-14 10:24:57 +0200]: > I would like to submit something (assuming submissions close at the end of > today), about adopt pytest month. But I am not sure if to put more of a > technical focus (tidbits in applying pytest to existing projects with > legacy or no tests), or community/process, or a mix. I'm the maintainer of one of the projects[1] signed up for adopt pytest month - I think it's a very interesting idea from the community/process view of things. I'd like to see a similiar thing in other projects (say, Sphinx[2]) too and really like the idea! As for the technical side, I don't know if this would be much different than a "why should you use pytest?" talk (i.e. talking about fixtures, plain asserts, parametrization, etc.). It's definitely an interesting aspect too, but I'm not sure whether it's suitable for a longer talk - so I'd say go for a mixture of both! Florian [1] http://www.qutebrowser.org/ for the curious [2] http://www.sphinx-doc.org/ -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From holger at merlinux.eu Tue Apr 14 10:51:56 2015 From: holger at merlinux.eu (holger krekel) Date: Tue, 14 Apr 2015 08:51:56 +0000 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: References: <20150414073346.GP15735@merlinux.eu> Message-ID: <20150414085156.GT15735@merlinux.eu> On Tue, Apr 14, 2015 at 10:24 +0200, Brianna Laugher wrote: > I would like to submit something (assuming submissions close at the end of > today), about adopt pytest month. But I am not sure if to put more of a > technical focus (tidbits in applying pytest to existing projects with > legacy or no tests), or community/process, or a mix. I think a "lessons learned" style talk would be interesting, indeed. Submission closes midnight (Berlin time +-1 i presume). holger > Brianna > On 14/04/2015 9:33 AM, "holger krekel" wrote: > > > Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, > > > > Today the CFP for EP2015 in Bilbao ends. Did you submit talks? > > I am pondering something pytest or tox or devpi related, maybe a training. > > I'd like to make sure we don't overlap too much or even complement each > > other. > > > > best, > > holger > > _______________________________________________ > > pytest-dev mailing list > > pytest-dev at python.org > > https://mail.python.org/mailman/listinfo/pytest-dev > > -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From flub at devork.be Tue Apr 14 11:33:39 2015 From: flub at devork.be (Floris Bruynooghe) Date: Tue, 14 Apr 2015 10:33:39 +0100 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: References: <20150414073346.GP15735@merlinux.eu> Message-ID: Hi, On 14 April 2015 at 09:24, Brianna Laugher wrote: > I would like to submit something (assuming submissions close at the end of > today), about adopt pytest month. But I am not sure if to put more of a > technical focus (tidbits in applying pytest to existing projects with > legacy or no tests), or community/process, or a mix. > This does sound like a good topic, I guess you can remain vague in the submission on whether you'll end up talking about technical bits and leave it depending on feedback after it's finished. Usually they allow updating of abstracts closer to the conference so you can still update it once you know the actual contents of the talk. Personally I've been struggling with finding an interesting py.test talk topic this time round so currently don't think I'll submit anything. Although I think a tutorial submission would still be good, but I think Holger is doing this? Regards, Floris -------------- next part -------------- An HTML attachment was scrubbed... URL: From raphael at hackebrot.de Tue Apr 14 12:35:29 2015 From: raphael at hackebrot.de (Raphael Pierzina) Date: Tue, 14 Apr 2015 12:35:29 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: References: <20150414073346.GP15735@merlinux.eu> Message-ID: <552CED71.5080804@hackebrot.de> +1 I really like the idea of Brianna giving a talk on AdoptPytestMonth at EuroPython. Mixing up the topics of community/process and more technical aspects should be just fine! Bruno and I are currently working together with Florian on qutebrowser[1] in the course of AdopPytestMonth. I am positive that we all learned quite a bit particularly with regard to the workflow and communication. For example we are using a separate working repo[2] to do thorough code reviews without spamming the original project. Once Florian, being the maintainer of qutebrowser, is happy with the changes he merges it eventually. On top of that there are certain techniques of converting fixtures and mocking that have proved to be successful. Raphael [1] https://github.com/The-Compiler/qutebrowser [2] https://github.com/hackebrot/qutebrowser On 14.04.2015 10:24, Brianna Laugher wrote: > > I would like to submit something (assuming submissions close at the > end of today), about adopt pytest month. But I am not sure if to put > more of a technical focus (tidbits in applying pytest to existing > projects with legacy or no tests), or community/process, or a mix. > > Brianna > > On 14/04/2015 9:33 AM, "holger krekel" > wrote: > > Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, > > Today the CFP for EP2015 in Bilbao ends. Did you submit talks? > I am pondering something pytest or tox or devpi related, maybe a > training. > I'd like to make sure we don't overlap too much or even complement > each other. > > best, > holger > _______________________________________________ > 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 raphael at hackebrot.de Tue Apr 14 21:17:40 2015 From: raphael at hackebrot.de (Raphael Pierzina) Date: Tue, 14 Apr 2015 21:17:40 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: <20150414073346.GP15735@merlinux.eu> References: <20150414073346.GP15735@merlinux.eu> Message-ID: <552D67D4.1040902@hackebrot.de> Hi, The CFP for EP2015 has been extended until 2015-04-28! http://blog.europython.eu/post/116392207002/europython-2015-call-for-proposals-has-been Raphael On 14.04.2015 09:33, holger krekel wrote: > Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, > > Today the CFP for EP2015 in Bilbao ends. Did you submit talks? > I am pondering something pytest or tox or devpi related, maybe a training. > I'd like to make sure we don't overlap too much or even complement each other. > > best, > holger > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From brianna.laugher at gmail.com Tue Apr 14 22:34:12 2015 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Tue, 14 Apr 2015 22:34:12 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: <552D67D4.1040902@hackebrot.de> References: <20150414073346.GP15735@merlinux.eu> <552D67D4.1040902@hackebrot.de> Message-ID: That's good news Raphael :) Thanks for the positive feedback, everyone. Here is my draft proposal, please make any comments on the google doc (or in email to me if you don't use google) https://docs.google.com/document/d/14YXXh452Aypw_MZ9u0ebv_cMQrEXfk5gJKX4zfXasAc/edit?usp=sharing You can also volunteer for the Help desk! https://ep2015.europython.eu/en/call-for-proposals/ It sounds like quite a cool idea, and anyone who volunteered for Adopt pytest month would be well qualified for it I think :) cheers Brianna On 14 April 2015 at 21:17, Raphael Pierzina wrote: > Hi, > > The CFP for EP2015 has been extended until 2015-04-28! > http://blog.europython.eu/post/116392207002/europython-2015-call-for-proposals-has-been > > Raphael > > > On 14.04.2015 09:33, holger krekel wrote: >> >> Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, >> >> Today the CFP for EP2015 in Bilbao ends. Did you submit talks? >> I am pondering something pytest or tox or devpi related, maybe a training. >> I'd like to make sure we don't overlap too much or even complement each >> other. >> >> best, >> holger >> _______________________________________________ >> 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 -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ From dhunt at mozilla.com Wed Apr 15 17:05:59 2015 From: dhunt at mozilla.com (Dave Hunt) Date: Wed, 15 Apr 2015 16:05:59 +0100 Subject: [pytest-dev] New plugin for generating HTML report (and request for help) Message-ID: <14250C73-AC53-451C-9824-0ABD284DF15C@mozilla.com> Hey py.testers! I?ve been working on pulling a feature out of our pytest-mozwebqa plugin into a standalone plugin. I think others may find it useful, and it would simplify maintenance of the former plugin to split this out. Please take a look over the pytest-html plugin, the source code is available here: https://github.com/davehunt/pytest-html Basically this plugin provides a new command line option of ?html which allows the user to specify a path for a HTML report to be generated. The report can then be enhanced by adding extra components via the pytest_runtest_makereport hook. You can see an example of this in my in-progress branch of pytest-mozwebqa where I?ve switched to using the new plugin: https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126 What I?d like some help with is providing the HTML report with environment details. This is essentially just a dictionary that will be included in the HTML report, but should be optionally provided by another plugin or conftest.py file. At the moment I accept an environment keyword argument when instantiating the HTMLReport object, but I?m not aware of a way to influence this from another plugin. See: https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44 and https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195 If anybody has any advice it would be much appreciated! Thanks in advance, -- Dave Hunt Automation Engineer Mozilla Corporation dhunt at mozilla.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephan.obermann at dolby.com Wed Apr 15 18:00:38 2015 From: stephan.obermann at dolby.com (Obermann, Stephan) Date: Wed, 15 Apr 2015 16:00:38 +0000 Subject: [pytest-dev] How to make custom plugin "pytest-xdist"-ready? Message-ID: Hi, I?ve developed a pytest plugin, that collects information during a pytest run and stores it into file at the end of the run. So far, it works nicely but some of our internal users run it in combination with ?pytest-xdist? and there it crashes. Details: In order to get the pytest test result, I use the hook ?pytest_runtest_logreport()? and retrieve pytest result category, letter and word via: result_category, result_letter, result_word = config.hook.pytest_report_teststatus(report=report) Now, in combination with ?pytest-xdist? it crashes with: INTERNALERROR> result_category, result_letter, result_word = config.hook.pytest_report_teststatus(report=report) INTERNALERROR> TypeError: 'NoneType' object is not iterable I did not find any hints in pytest-xdist?s documentation (https://bitbucket.org/pytest-dev/pytest-xdist). Therefore, is there any guidance (in form of documentation/experience) available on how to make a plugin work nicely together with ?pytest-xdist?? Kind regards, /stephan From nicoddemus at gmail.com Wed Apr 15 22:16:00 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Wed, 15 Apr 2015 17:16:00 -0300 Subject: [pytest-dev] New plugin for generating HTML report (and request for help) In-Reply-To: <14250C73-AC53-451C-9824-0ABD284DF15C@mozilla.com> References: <14250C73-AC53-451C-9824-0ABD284DF15C@mozilla.com> Message-ID: Hi Dave, Congratulations on this initiative to separate this functionality into a separate plugin, it seems very useful! :) One way to allow other plugins to interact with yours is by defining your own hooks. Pytest-xdist does this[1], and as an example, the builtin hook pytest_report_header[2] seems to do something similar to what you want, in the sense that it allows other plugins to add information to the terminal header. Perhaps you can declare a hook `pytest_html_report_environment`, which plugins can implement and return a dict of environment variables to be added to the report? Or perhaps, if it makes sense for the environment details to appear in the terminal output as well, you could in fact just call `pytest_report_header` and add its contents into the HTML; the latter has the benefit that existing plugins which already use `pytest_report_header` will be able to write their information to the HTML report. Cheers, [1] https://bitbucket.org/pytest-dev/pytest-xdist/src/00cfff4834e718fd3c1ccec40811e734d796f631/xdist/newhooks.py [2] http://pytest.org/latest/example/simple.html?highlight=pytest_report_header#adding-info-to-test-report-header On Wed, Apr 15, 2015 at 12:05 PM, Dave Hunt wrote: > Hey py.testers! > > I?ve been working on pulling a feature out of our pytest-mozwebqa plugin > into a standalone plugin. I think others may find it useful, and it would > simplify maintenance of the former plugin to split this out. Please take a > look over the pytest-html plugin, the source code is available here: > https://github.com/davehunt/pytest-html > > Basically this plugin provides a new command line option of ?html which > allows the user to specify a path for a HTML report to be generated. The > report can then be enhanced by adding extra components via > the pytest_runtest_makereport hook. You can see an example of this in my > in-progress branch of pytest-mozwebqa where I?ve switched to using the new > plugin: > https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126 > > What I?d like some help with is providing the HTML report with environment > details. This is essentially just a dictionary that will be included in the > HTML report, but should be optionally provided by another plugin or > conftest.py file. At the moment I accept an environment keyword argument > when instantiating the HTMLReport object, but I?m not aware of a way to > influence this from another plugin. See: > https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44 > and > https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195 > > If anybody has any advice it would be much appreciated! > > Thanks in advance, > > -- > *Dave Hunt* > Automation Engineer > Mozilla Corporation > dhunt at mozilla.com > > > _______________________________________________ > 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 holger at merlinux.eu Thu Apr 16 08:43:20 2015 From: holger at merlinux.eu (holger krekel) Date: Thu, 16 Apr 2015 06:43:20 +0000 Subject: [pytest-dev] How to make custom plugin "pytest-xdist"-ready? In-Reply-To: References: Message-ID: <20150416064320.GA15735@merlinux.eu> Hi Stephan, On Wed, Apr 15, 2015 at 16:00 +0000, Obermann, Stephan wrote: > Hi, > > I?ve developed a pytest plugin, that collects information during a pytest > run and stores it into file at the end of the run. > > So far, it works nicely but some of our internal users run it in > combination with ?pytest-xdist? and there it crashes. > > Details: > > In order to get the pytest test result, I use the hook > ?pytest_runtest_logreport()? and retrieve pytest result category, letter > and word via: > > result_category, result_letter, result_word = > config.hook.pytest_report_teststatus(report=report) > > > Now, in combination with ?pytest-xdist? it crashes with: > > INTERNALERROR> result_category, result_letter, result_word = > config.hook.pytest_report_teststatus(report=report) > INTERNALERROR> TypeError: 'NoneType' object is not iterable One important (and somewhat undocumented) detail regarding hooks and xdist that one needs to consider is if a hook shall execute on the master or on each node. Not sure about your use case but you execute your logreport hook only on the master where all test reports are logged to the terminal. You can check if you are on the master like this: if not hasattr(config, "slaveinput"): # we are on the master # (test nodes have a slaveinput dict, master doesn't) > I did not find any hints in pytest-xdist?s documentation > (https://bitbucket.org/pytest-dev/pytest-xdist). > Therefore, is there any guidance (in form of documentation/experience) > available on how to make a plugin work nicely together with ?pytest-xdist?? No, there s not much. Some plugins like pytest-cov and do work with pytest-xdist. Maybe we can use this mail exchange here to add some bits to the pytest-xdist README (which shows up on pypi as doc). On a sidenote, i'd like to change the term "slave" for "testnode" or "node" at some point. holger From dhunt at mozilla.com Thu Apr 16 18:46:27 2015 From: dhunt at mozilla.com (Dave Hunt) Date: Thu, 16 Apr 2015 17:46:27 +0100 Subject: [pytest-dev] New plugin for generating HTML report (and request for help) In-Reply-To: References: <14250C73-AC53-451C-9824-0ABD284DF15C@mozilla.com> Message-ID: Thanks Bruno, the custom hook works well. Here?s the change: https://github.com/davehunt/pytest-html/commit/2a405a3cdc638c1896ab3d1074296496bb1fa3a8 Now I need to work out why I get issues when I use this with pytest-xdist. It looks like it?s complaining about the extra report details not being serializable?! See traceback below: test_login.py::TestLogin::test_invalid_username INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 84, in wrap_session INTERNALERROR> doit(config, session) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 122, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "", line 56, in pytest_runtestloop INTERNALERROR> File "", line 72, in run_tests INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 393, in execute INTERNALERROR> return wrapped_call(method(*args), self.execute) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 113, in wrapped_call INTERNALERROR> return call_outcome.get_result() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 138, in get_result INTERNALERROR> py.builtin._reraise(*ex) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 123, in __init__ INTERNALERROR> self.result = func() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 65, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 75, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 123, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "", line 86, in pytest_runtest_logreport INTERNALERROR> File "", line 23, in sendevent INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 691, in send INTERNALERROR> self.gateway._send(Message.CHANNEL_DATA, self.id, dumps_internal(item)) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1295, in dumps_internal INTERNALERROR> return _Serializer().save(obj) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1313, in save INTERNALERROR> self._save(obj) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save INTERNALERROR> dispatch(self, obj) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1412, in save_tuple INTERNALERROR> self._save(item) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save INTERNALERROR> dispatch(self, obj) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1408, in save_dict INTERNALERROR> self._write_setitem(key, value) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem INTERNALERROR> self._save(value) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save INTERNALERROR> dispatch(self, obj) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1408, in save_dict INTERNALERROR> self._write_setitem(key, value) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem INTERNALERROR> self._save(value) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save INTERNALERROR> dispatch(self, obj) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1398, in save_list INTERNALERROR> self._write_setitem(i, item) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem INTERNALERROR> self._save(value) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1329, in _save INTERNALERROR> raise DumpError("can't serialize %s" % (tp,)) INTERNALERROR> DumpError: can't serialize INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 84, in wrap_session INTERNALERROR> doit(config, session) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 122, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 504, in pytest_runtestloop INTERNALERROR> self.loop_once() INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 522, in loop_once INTERNALERROR> call(**kwargs) INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 560, in slave_slavefinished INTERNALERROR> assert not crashitem, (crashitem, node) INTERNALERROR> AssertionError: ('test_login.py::TestLogin::()::test_invalid_username', ) -- Dave Hunt Firefox OS Automation Engineer Mozilla Corporation dhunt at mozilla.com > On 15 Apr 2015, at 21:16, Bruno Oliveira wrote: > > Hi Dave, > > Congratulations on this initiative to separate this functionality into a separate plugin, it seems very useful! :) > > One way to allow other plugins to interact with yours is by defining your own hooks. Pytest-xdist does this[1], and as an example, the builtin hook pytest_report_header[2] seems to do something similar to what you want, in the sense that it allows other plugins to add information to the terminal header. > > Perhaps you can declare a hook `pytest_html_report_environment`, which plugins can implement and return a dict of environment variables to be added to the report? Or perhaps, if it makes sense for the environment details to appear in the terminal output as well, you could in fact just call `pytest_report_header` and add its contents into the HTML; the latter has the benefit that existing plugins which already use `pytest_report_header` will be able to write their information to the HTML report. > > Cheers, > > [1] https://bitbucket.org/pytest-dev/pytest-xdist/src/00cfff4834e718fd3c1ccec40811e734d796f631/xdist/newhooks.py > [2] http://pytest.org/latest/example/simple.html?highlight=pytest_report_header#adding-info-to-test-report-header > > On Wed, Apr 15, 2015 at 12:05 PM, Dave Hunt > wrote: > Hey py.testers! > > I?ve been working on pulling a feature out of our pytest-mozwebqa plugin into a standalone plugin. I think others may find it useful, and it would simplify maintenance of the former plugin to split this out. Please take a look over the pytest-html plugin, the source code is available here: https://github.com/davehunt/pytest-html > > Basically this plugin provides a new command line option of ?html which allows the user to specify a path for a HTML report to be generated. The report can then be enhanced by adding extra components via the pytest_runtest_makereport hook. You can see an example of this in my in-progress branch of pytest-mozwebqa where I?ve switched to using the new plugin: https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126 > > What I?d like some help with is providing the HTML report with environment details. This is essentially just a dictionary that will be included in the HTML report, but should be optionally provided by another plugin or conftest.py file. At the moment I accept an environment keyword argument when instantiating the HTMLReport object, but I?m not aware of a way to influence this from another plugin. See: https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44 and https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195 > > If anybody has any advice it would be much appreciated! > > Thanks in advance, > > -- > Dave Hunt > Automation Engineer > Mozilla Corporation > dhunt at mozilla.com > > _______________________________________________ > 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 schettino72 at gmail.com Fri Apr 17 20:38:53 2015 From: schettino72 at gmail.com (Eduardo Schettino) Date: Sat, 18 Apr 2015 02:38:53 +0800 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest Message-ID: Hi, I am using the pytester plugin to test my own plugin. It works ok but I can not get code coverage because testdir.runpytest uses os.popen(). Have anyone managed to work around that? Can you point me to a project/plugin that handles that? cheers, Eduardo -------------- next part -------------- An HTML attachment was scrubbed... URL: From tibor.arpas at infinit.sk Fri Apr 17 20:51:41 2015 From: tibor.arpas at infinit.sk (Tibor Arpas) Date: Fri, 17 Apr 2015 18:51:41 +0000 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: References: Message-ID: Hi, have you tried http://nedbatchelder.com/code/coverage/subprocess.html ? It works for me. Also pytest-cov plugin advertises it supports measuring subprocesses. And testdir.inline_run() exists, in case you didn't spot it. That doesn't use popen so coverage is recorded just fine. The downside of inline_run for me was that I coudln't get the stdout of the execution. Tibor On Fri, Apr 17, 2015 at 8:39 PM Eduardo Schettino wrote: > Hi, > > I am using the pytester plugin to test my own plugin. > > It works ok but I can not get code coverage because testdir.runpytest uses > os.popen(). > Have anyone managed to work around that? Can you point me to a > project/plugin that handles that? > > cheers, > Eduardo > _______________________________________________ > 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 bubenkoff at gmail.com Fri Apr 17 21:38:55 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Fri, 17 Apr 2015 21:38:55 +0200 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: References: Message-ID: Yes i had the same issue and solved it by avoiding pytest-cov. See pytest-splinter and its tox.ini coveralls testenv. On Apr 17, 2015 8:39 PM, "Eduardo Schettino" wrote: > Hi, > > I am using the pytester plugin to test my own plugin. > > It works ok but I can not get code coverage because testdir.runpytest uses > os.popen(). > Have anyone managed to work around that? Can you point me to a > project/plugin that handles that? > > cheers, > Eduardo > > _______________________________________________ > 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 schettino72 at gmail.com Fri Apr 17 23:34:13 2015 From: schettino72 at gmail.com (Eduardo Schettino) Date: Sat, 18 Apr 2015 05:34:13 +0800 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: References: Message-ID: Thanks, I solved my problem using testdir.inline_run(). The lack of output doesnt matter because I can use TestReport objects... cheers On Sat, Apr 18, 2015 at 3:38 AM, Anatoly Bubenkov wrote: > Yes i had the same issue and solved it by avoiding pytest-cov. > See pytest-splinter and its tox.ini coveralls testenv. > On Apr 17, 2015 8:39 PM, "Eduardo Schettino" > wrote: > >> Hi, >> >> I am using the pytester plugin to test my own plugin. >> >> It works ok but I can not get code coverage because testdir.runpytest >> uses os.popen(). >> Have anyone managed to work around that? Can you point me to a >> project/plugin that handles that? >> >> cheers, >> Eduardo >> >> _______________________________________________ >> 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 holger at merlinux.eu Sat Apr 18 09:17:06 2015 From: holger at merlinux.eu (holger krekel) Date: Sat, 18 Apr 2015 07:17:06 +0000 Subject: [pytest-dev] pytest-2.7.1 / bugs? / release? Message-ID: <20150418071706.GI15735@merlinux.eu> Hi all, what about we try to do a little pytest-2.7.1 release in like 10 days or so? Two suggestions for that: - everyone picks and fixes (at least) one bug within the next 7 days (everyone == (committers + anyone) willing to help) - someone other than me does the release (i'll be around to help if questions arise) according to doc/en/release.txt Meanwhile i am working on adding wheel support to "devpi test" so that we can publish wheels as well, including for the "py" dependency. That should hopefully land next week as it experimentally works already. best, holger -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From nicoddemus at gmail.com Sat Apr 18 16:30:08 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Sat, 18 Apr 2015 11:30:08 -0300 Subject: [pytest-dev] pytest-2.7.1 / bugs? / release? In-Reply-To: <20150418071706.GI15735@merlinux.eu> References: <20150418071706.GI15735@merlinux.eu> Message-ID: Hi, I find that a bug sprint is a good idea, count me in. Cheers, On Sat, Apr 18, 2015 at 4:17 AM, holger krekel wrote: > Hi all, > > what about we try to do a little pytest-2.7.1 release in like 10 days or > so? > > Two suggestions for that: > > - everyone picks and fixes (at least) one bug within the next 7 days > (everyone == (committers + anyone) willing to help) > > - someone other than me does the release (i'll be around to help > if questions arise) according to doc/en/release.txt > > Meanwhile i am working on adding wheel support to "devpi test" so that > we can publish wheels as well, including for the "py" dependency. > That should hopefully land next week as it experimentally works already. > > best, > holger > > -- > about me: http://holgerkrekel.net/about-me/ > contracting: http://merlinux.eu > _______________________________________________ > 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 bubenkoff at gmail.com Sat Apr 18 22:53:53 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Sat, 18 Apr 2015 22:53:53 +0200 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: References: Message-ID: Its not always enough and possible to use inline run, but indeed helps for pytest-cov On Apr 17, 2015 11:34 PM, "Eduardo Schettino" wrote: > Thanks, I solved my problem using testdir.inline_run(). > > The lack of output doesnt matter because I can use TestReport objects... > > cheers > > On Sat, Apr 18, 2015 at 3:38 AM, Anatoly Bubenkov > wrote: > >> Yes i had the same issue and solved it by avoiding pytest-cov. >> See pytest-splinter and its tox.ini coveralls testenv. >> On Apr 17, 2015 8:39 PM, "Eduardo Schettino" >> wrote: >> >>> Hi, >>> >>> I am using the pytester plugin to test my own plugin. >>> >>> It works ok but I can not get code coverage because testdir.runpytest >>> uses os.popen(). >>> Have anyone managed to work around that? Can you point me to a >>> project/plugin that handles that? >>> >>> cheers, >>> Eduardo >>> >>> _______________________________________________ >>> 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 holger at merlinux.eu Sun Apr 19 09:32:24 2015 From: holger at merlinux.eu (holger krekel) Date: Sun, 19 Apr 2015 07:32:24 +0000 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: References: Message-ID: <20150419073224.GK15735@merlinux.eu> On Sat, Apr 18, 2015 at 22:53 +0200, Anatoly Bubenkov wrote: > Its not always enough and possible to use inline run, but indeed helps for > pytest-cov I'd like to make inline_run behave as much as possible like runpytest() (which creates a subprocess). One issue is capturing output, what are others in your experience? holger > On Apr 17, 2015 11:34 PM, "Eduardo Schettino" wrote: > > > Thanks, I solved my problem using testdir.inline_run(). > > > > The lack of output doesnt matter because I can use TestReport objects... > > > > cheers > > > > On Sat, Apr 18, 2015 at 3:38 AM, Anatoly Bubenkov > > wrote: > > > >> Yes i had the same issue and solved it by avoiding pytest-cov. > >> See pytest-splinter and its tox.ini coveralls testenv. > >> On Apr 17, 2015 8:39 PM, "Eduardo Schettino" > >> wrote: > >> > >>> Hi, > >>> > >>> I am using the pytester plugin to test my own plugin. > >>> > >>> It works ok but I can not get code coverage because testdir.runpytest > >>> uses os.popen(). > >>> Have anyone managed to work around that? Can you point me to a > >>> project/plugin that handles that? > >>> > >>> cheers, > >>> Eduardo > >>> > >>> _______________________________________________ > >>> 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 -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From holger at merlinux.eu Sun Apr 19 10:16:36 2015 From: holger at merlinux.eu (holger krekel) Date: Sun, 19 Apr 2015 08:16:36 +0000 Subject: [pytest-dev] New plugin for generating HTML report (and request for help) In-Reply-To: References: <14250C73-AC53-451C-9824-0ABD284DF15C@mozilla.com> Message-ID: <20150419081636.GO15735@merlinux.eu> On Thu, Apr 16, 2015 at 17:46 +0100, Dave Hunt wrote: > Thanks Bruno, the custom hook works well. Here?s the change: https://github.com/davehunt/pytest-html/commit/2a405a3cdc638c1896ab3d1074296496bb1fa3a8 > > Now I need to work out why I get issues when I use this with pytest-xdist. It looks like it?s complaining about the extra report details not being serializable?! See traceback below: Yes, you need to make sure that anything extra you put on the report is marshallable. In the case of your url you may just send a string and parse as url on the logreport/master side. holger > test_login.py::TestLogin::test_invalid_username INTERNALERROR> Traceback (most recent call last): > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 84, in wrap_session > INTERNALERROR> doit(config, session) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 122, in _main > INTERNALERROR> config.hook.pytest_runtestloop(session=session) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ > INTERNALERROR> return self._docall(self.methods, kwargs) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall > INTERNALERROR> firstresult=self.firstresult).execute() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute > INTERNALERROR> res = method(*args) > INTERNALERROR> File "", line 56, in pytest_runtestloop > INTERNALERROR> File "", line 72, in run_tests > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ > INTERNALERROR> return self._docall(self.methods, kwargs) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall > INTERNALERROR> firstresult=self.firstresult).execute() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 393, in execute > INTERNALERROR> return wrapped_call(method(*args), self.execute) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 113, in wrapped_call > INTERNALERROR> return call_outcome.get_result() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 138, in get_result > INTERNALERROR> py.builtin._reraise(*ex) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 123, in __init__ > INTERNALERROR> self.result = func() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute > INTERNALERROR> res = method(*args) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 65, in pytest_runtest_protocol > INTERNALERROR> runtestprotocol(item, nextitem=nextitem) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 75, in runtestprotocol > INTERNALERROR> reports.append(call_and_report(item, "call", log)) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 123, in call_and_report > INTERNALERROR> hook.pytest_runtest_logreport(report=report) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ > INTERNALERROR> return self._docall(self.methods, kwargs) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall > INTERNALERROR> firstresult=self.firstresult).execute() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute > INTERNALERROR> res = method(*args) > INTERNALERROR> File "", line 86, in pytest_runtest_logreport > INTERNALERROR> File "", line 23, in sendevent > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 691, in send > INTERNALERROR> self.gateway._send(Message.CHANNEL_DATA, self.id, dumps_internal(item)) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1295, in dumps_internal > INTERNALERROR> return _Serializer().save(obj) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1313, in save > INTERNALERROR> self._save(obj) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save > INTERNALERROR> dispatch(self, obj) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1412, in save_tuple > INTERNALERROR> self._save(item) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save > INTERNALERROR> dispatch(self, obj) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1408, in save_dict > INTERNALERROR> self._write_setitem(key, value) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem > INTERNALERROR> self._save(value) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save > INTERNALERROR> dispatch(self, obj) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1408, in save_dict > INTERNALERROR> self._write_setitem(key, value) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem > INTERNALERROR> self._save(value) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save > INTERNALERROR> dispatch(self, obj) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1398, in save_list > INTERNALERROR> self._write_setitem(i, item) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem > INTERNALERROR> self._save(value) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1329, in _save > INTERNALERROR> raise DumpError("can't serialize %s" % (tp,)) > INTERNALERROR> DumpError: can't serialize > > INTERNALERROR> Traceback (most recent call last): > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 84, in wrap_session > INTERNALERROR> doit(config, session) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 122, in _main > INTERNALERROR> config.hook.pytest_runtestloop(session=session) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ > INTERNALERROR> return self._docall(self.methods, kwargs) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall > INTERNALERROR> firstresult=self.firstresult).execute() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute > INTERNALERROR> res = method(*args) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 504, in pytest_runtestloop > INTERNALERROR> self.loop_once() > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 522, in loop_once > INTERNALERROR> call(**kwargs) > INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 560, in slave_slavefinished > INTERNALERROR> assert not crashitem, (crashitem, node) > INTERNALERROR> AssertionError: ('test_login.py::TestLogin::()::test_invalid_username', ) > > -- > Dave Hunt > Firefox OS Automation Engineer > Mozilla Corporation > dhunt at mozilla.com > > > On 15 Apr 2015, at 21:16, Bruno Oliveira wrote: > > > > Hi Dave, > > > > Congratulations on this initiative to separate this functionality into a separate plugin, it seems very useful! :) > > > > One way to allow other plugins to interact with yours is by defining your own hooks. Pytest-xdist does this[1], and as an example, the builtin hook pytest_report_header[2] seems to do something similar to what you want, in the sense that it allows other plugins to add information to the terminal header. > > > > Perhaps you can declare a hook `pytest_html_report_environment`, which plugins can implement and return a dict of environment variables to be added to the report? Or perhaps, if it makes sense for the environment details to appear in the terminal output as well, you could in fact just call `pytest_report_header` and add its contents into the HTML; the latter has the benefit that existing plugins which already use `pytest_report_header` will be able to write their information to the HTML report. > > > > Cheers, > > > > [1] https://bitbucket.org/pytest-dev/pytest-xdist/src/00cfff4834e718fd3c1ccec40811e734d796f631/xdist/newhooks.py > > [2] http://pytest.org/latest/example/simple.html?highlight=pytest_report_header#adding-info-to-test-report-header > > > > On Wed, Apr 15, 2015 at 12:05 PM, Dave Hunt > wrote: > > Hey py.testers! > > > > I?ve been working on pulling a feature out of our pytest-mozwebqa plugin into a standalone plugin. I think others may find it useful, and it would simplify maintenance of the former plugin to split this out. Please take a look over the pytest-html plugin, the source code is available here: https://github.com/davehunt/pytest-html > > > > Basically this plugin provides a new command line option of ?html which allows the user to specify a path for a HTML report to be generated. The report can then be enhanced by adding extra components via the pytest_runtest_makereport hook. You can see an example of this in my in-progress branch of pytest-mozwebqa where I?ve switched to using the new plugin: https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126 > > > > What I?d like some help with is providing the HTML report with environment details. This is essentially just a dictionary that will be included in the HTML report, but should be optionally provided by another plugin or conftest.py file. At the moment I accept an environment keyword argument when instantiating the HTMLReport object, but I?m not aware of a way to influence this from another plugin. See: https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44 and https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195 > > > > If anybody has any advice it would be much appreciated! > > > > Thanks in advance, > > > > -- > > Dave Hunt > > Automation Engineer > > Mozilla Corporation > > dhunt at mozilla.com > > > > _______________________________________________ > > 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 -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From schettino72 at gmail.com Mon Apr 20 06:04:41 2015 From: schettino72 at gmail.com (Eduardo Schettino) Date: Mon, 20 Apr 2015 12:04:41 +0800 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: <20150419073224.GK15735@merlinux.eu> References: <20150419073224.GK15735@merlinux.eu> Message-ID: On Sun, Apr 19, 2015 at 3:32 PM, holger krekel wrote: > On Sat, Apr 18, 2015 at 22:53 +0200, Anatoly Bubenkov wrote: > > Its not always enough and possible to use inline run, but indeed helps > for > > pytest-cov > > I'd like to make inline_run behave as much as possible like runpytest() > (which creates a subprocess). One issue is capturing output, what are > others in your experience? > > holger > > To capture the output when needed, I just used the `capsys` fixture. Another issue I had was modifying a test module and re-running its tests. Of course the the original module was cached by the import system, so I had to delete it before the second run. Something like: `del sys.modules['test_xxx']`. Eduardo -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Mon Apr 20 09:34:33 2015 From: holger at merlinux.eu (holger krekel) Date: Mon, 20 Apr 2015 07:34:33 +0000 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: References: <20150419073224.GK15735@merlinux.eu> Message-ID: <20150420073433.GR15735@merlinux.eu> On Mon, Apr 20, 2015 at 12:04 +0800, Eduardo Schettino wrote: > On Sun, Apr 19, 2015 at 3:32 PM, holger krekel wrote: > > > On Sat, Apr 18, 2015 at 22:53 +0200, Anatoly Bubenkov wrote: > > > Its not always enough and possible to use inline run, but indeed helps > > for > > > pytest-cov > > > > I'd like to make inline_run behave as much as possible like runpytest() > > (which creates a subprocess). One issue is capturing output, what are > > others in your experience? > > > > holger > > > > > To capture the output when needed, I just used the `capsys` fixture. > > Another issue I had was modifying a test module and re-running its tests. > Of course the the original module was cached by the import system, > so I had to delete it before the second run. Something like: `del > sys.modules['test_xxx']`. There is some code in the pytester plugin which takes care of this: for name, mod in list(sys.modules.items()): if mod: fn = getattr(mod, '__file__', None) if fn and fn.startswith(str(self.tmpdir)): del sys.modules[name] but it's only called at the end of a test function. We could make it callable as a helper on "testdir" so you call it in between. Or, actually, we could do this cleanup after each inline_run() call automatically. If you agree do you want to submit a little PR (to default) and make sure it works for you? best, holger From tibor.arpas at infinit.sk Mon Apr 20 11:01:37 2015 From: tibor.arpas at infinit.sk (Tibor Arpas) Date: Mon, 20 Apr 2015 11:01:37 +0200 Subject: [pytest-dev] code coverage of tests using pytester - testdir.runpytest In-Reply-To: <20150419073224.GK15735@merlinux.eu> References: <20150419073224.GK15735@merlinux.eu> Message-ID: Holger, that would be great. I only used inline_run for one or two tests so I don't know if there is anything else important in a new functionality. Tibor On Sun, Apr 19, 2015 at 9:32 AM, holger krekel wrote: > On Sat, Apr 18, 2015 at 22:53 +0200, Anatoly Bubenkov wrote: > > Its not always enough and possible to use inline run, but indeed helps > for > > pytest-cov > > I'd like to make inline_run behave as much as possible like runpytest() > (which creates a subprocess). One issue is capturing output, what are > others in your experience? > > holger > > > > On Apr 17, 2015 11:34 PM, "Eduardo Schettino" > wrote: > > > > > Thanks, I solved my problem using testdir.inline_run(). > > > > > > The lack of output doesnt matter because I can use TestReport > objects... > > > > > > cheers > > > > > > On Sat, Apr 18, 2015 at 3:38 AM, Anatoly Bubenkov > > > > wrote: > > > > > >> Yes i had the same issue and solved it by avoiding pytest-cov. > > >> See pytest-splinter and its tox.ini coveralls testenv. > > >> On Apr 17, 2015 8:39 PM, "Eduardo Schettino" > > >> wrote: > > >> > > >>> Hi, > > >>> > > >>> I am using the pytester plugin to test my own plugin. > > >>> > > >>> It works ok but I can not get code coverage because testdir.runpytest > > >>> uses os.popen(). > > >>> Have anyone managed to work around that? Can you point me to a > > >>> project/plugin that handles that? > > >>> > > >>> cheers, > > >>> Eduardo > > >>> > > >>> _______________________________________________ > > >>> 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 > > > -- > about me: http://holgerkrekel.net/about-me/ > contracting: http://merlinux.eu > _______________________________________________ > 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 dhunt at mozilla.com Mon Apr 20 15:16:34 2015 From: dhunt at mozilla.com (Dave Hunt) Date: Mon, 20 Apr 2015 14:16:34 +0100 Subject: [pytest-dev] New plugin for generating HTML report (and request for help) In-Reply-To: <20150419081636.GO15735@merlinux.eu> References: <14250C73-AC53-451C-9824-0ABD284DF15C@mozilla.com> <20150419081636.GO15735@merlinux.eu> Message-ID: <5348FEA4-E12F-4525-B6D2-79FA0BE0CB0E@mozilla.com> Thanks for the help! I?ve just released the plugin on PyPI: https://pypi.python.org/pypi/pytest-html -- Dave Hunt Firefox OS Automation Engineer Mozilla Corporation dhunt at mozilla.com > On 19 Apr 2015, at 09:16, holger krekel wrote: > > On Thu, Apr 16, 2015 at 17:46 +0100, Dave Hunt wrote: >> Thanks Bruno, the custom hook works well. Here?s the change: https://github.com/davehunt/pytest-html/commit/2a405a3cdc638c1896ab3d1074296496bb1fa3a8 >> >> Now I need to work out why I get issues when I use this with pytest-xdist. It looks like it?s complaining about the extra report details not being serializable?! See traceback below: > > Yes, you need to make sure that anything extra you put on the report is marshallable. > In the case of your url you may just send a string and parse as url on > the logreport/master side. > > holger > > >> test_login.py::TestLogin::test_invalid_username INTERNALERROR> Traceback (most recent call last): >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 84, in wrap_session >> INTERNALERROR> doit(config, session) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 122, in _main >> INTERNALERROR> config.hook.pytest_runtestloop(session=session) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ >> INTERNALERROR> return self._docall(self.methods, kwargs) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall >> INTERNALERROR> firstresult=self.firstresult).execute() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute >> INTERNALERROR> res = method(*args) >> INTERNALERROR> File "", line 56, in pytest_runtestloop >> INTERNALERROR> File "", line 72, in run_tests >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ >> INTERNALERROR> return self._docall(self.methods, kwargs) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall >> INTERNALERROR> firstresult=self.firstresult).execute() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 393, in execute >> INTERNALERROR> return wrapped_call(method(*args), self.execute) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 113, in wrapped_call >> INTERNALERROR> return call_outcome.get_result() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 138, in get_result >> INTERNALERROR> py.builtin._reraise(*ex) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 123, in __init__ >> INTERNALERROR> self.result = func() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute >> INTERNALERROR> res = method(*args) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 65, in pytest_runtest_protocol >> INTERNALERROR> runtestprotocol(item, nextitem=nextitem) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 75, in runtestprotocol >> INTERNALERROR> reports.append(call_and_report(item, "call", log)) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/runner.py", line 123, in call_and_report >> INTERNALERROR> hook.pytest_runtest_logreport(report=report) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ >> INTERNALERROR> return self._docall(self.methods, kwargs) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall >> INTERNALERROR> firstresult=self.firstresult).execute() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute >> INTERNALERROR> res = method(*args) >> INTERNALERROR> File "", line 86, in pytest_runtest_logreport >> INTERNALERROR> File "", line 23, in sendevent >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 691, in send >> INTERNALERROR> self.gateway._send(Message.CHANNEL_DATA, self.id, dumps_internal(item)) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1295, in dumps_internal >> INTERNALERROR> return _Serializer().save(obj) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1313, in save >> INTERNALERROR> self._save(obj) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save >> INTERNALERROR> dispatch(self, obj) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1412, in save_tuple >> INTERNALERROR> self._save(item) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save >> INTERNALERROR> dispatch(self, obj) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1408, in save_dict >> INTERNALERROR> self._write_setitem(key, value) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem >> INTERNALERROR> self._save(value) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save >> INTERNALERROR> dispatch(self, obj) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1408, in save_dict >> INTERNALERROR> self._write_setitem(key, value) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem >> INTERNALERROR> self._save(value) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1331, in _save >> INTERNALERROR> dispatch(self, obj) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1398, in save_list >> INTERNALERROR> self._write_setitem(i, item) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1402, in _write_setitem >> INTERNALERROR> self._save(value) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/execnet/gateway_base.py", line 1329, in _save >> INTERNALERROR> raise DumpError("can't serialize %s" % (tp,)) >> INTERNALERROR> DumpError: can't serialize >> >> INTERNALERROR> Traceback (most recent call last): >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 84, in wrap_session >> INTERNALERROR> doit(config, session) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/main.py", line 122, in _main >> INTERNALERROR> config.hook.pytest_runtestloop(session=session) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 521, in __call__ >> INTERNALERROR> return self._docall(self.methods, kwargs) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 528, in _docall >> INTERNALERROR> firstresult=self.firstresult).execute() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/pytest-2.7.0-py2.7.egg/_pytest/core.py", line 394, in execute >> INTERNALERROR> res = method(*args) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 504, in pytest_runtestloop >> INTERNALERROR> self.loop_once() >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 522, in loop_once >> INTERNALERROR> call(**kwargs) >> INTERNALERROR> File "/Users/dhunt/.virtualenvs/tmp-97b1b20a17ffb8d0/lib/python2.7/site-packages/xdist/dsession.py", line 560, in slave_slavefinished >> INTERNALERROR> assert not crashitem, (crashitem, node) >> INTERNALERROR> AssertionError: ('test_login.py::TestLogin::()::test_invalid_username', ) >> >> -- >> Dave Hunt >> Firefox OS Automation Engineer >> Mozilla Corporation >> dhunt at mozilla.com >> >>> On 15 Apr 2015, at 21:16, Bruno Oliveira wrote: >>> >>> Hi Dave, >>> >>> Congratulations on this initiative to separate this functionality into a separate plugin, it seems very useful! :) >>> >>> One way to allow other plugins to interact with yours is by defining your own hooks. Pytest-xdist does this[1], and as an example, the builtin hook pytest_report_header[2] seems to do something similar to what you want, in the sense that it allows other plugins to add information to the terminal header. >>> >>> Perhaps you can declare a hook `pytest_html_report_environment`, which plugins can implement and return a dict of environment variables to be added to the report? Or perhaps, if it makes sense for the environment details to appear in the terminal output as well, you could in fact just call `pytest_report_header` and add its contents into the HTML; the latter has the benefit that existing plugins which already use `pytest_report_header` will be able to write their information to the HTML report. >>> >>> Cheers, >>> >>> [1] https://bitbucket.org/pytest-dev/pytest-xdist/src/00cfff4834e718fd3c1ccec40811e734d796f631/xdist/newhooks.py >>> [2] http://pytest.org/latest/example/simple.html?highlight=pytest_report_header#adding-info-to-test-report-header >>> >>> On Wed, Apr 15, 2015 at 12:05 PM, Dave Hunt > wrote: >>> Hey py.testers! >>> >>> I?ve been working on pulling a feature out of our pytest-mozwebqa plugin into a standalone plugin. I think others may find it useful, and it would simplify maintenance of the former plugin to split this out. Please take a look over the pytest-html plugin, the source code is available here: https://github.com/davehunt/pytest-html >>> >>> Basically this plugin provides a new command line option of ?html which allows the user to specify a path for a HTML report to be generated. The report can then be enhanced by adding extra components via the pytest_runtest_makereport hook. You can see an example of this in my in-progress branch of pytest-mozwebqa where I?ve switched to using the new plugin: https://github.com/davehunt/pytest-mozwebqa/blob/1074f0770a146cff3108191a2fe239d15cfd92e4/pytest_mozwebqa/pytest_mozwebqa.py#L126 >>> >>> What I?d like some help with is providing the HTML report with environment details. This is essentially just a dictionary that will be included in the HTML report, but should be optionally provided by another plugin or conftest.py file. At the moment I accept an environment keyword argument when instantiating the HTMLReport object, but I?m not aware of a way to influence this from another plugin. See: https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L44 and https://github.com/davehunt/pytest-html/blob/752f229b990c80e66195374a4ed4fe22b98017c6/pytest_html.py#L195 >>> >>> If anybody has any advice it would be much appreciated! >>> >>> Thanks in advance, >>> >>> -- >>> Dave Hunt >>> Automation Engineer >>> Mozilla Corporation >>> dhunt at mozilla.com >>> >>> _______________________________________________ >>> 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 > > > -- > about me: http://holgerkrekel.net/about-me/ > contracting: http://merlinux.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From sb3400 at columbia.edu Mon Apr 20 14:59:05 2015 From: sb3400 at columbia.edu (Sravan Bhamidipati) Date: Mon, 20 Apr 2015 08:59:05 -0400 Subject: [pytest-dev] Pytest + Doctest + Tox Message-ID: Hello pytesters, I am trying to get guessit to adopt pytest this month. It uses tox. When I try to run the tests with the "--doctest-modules" option, the tests are being discovered as expected, but the run fails with the following error: ========================================================================== > ERRORS > ========================================================================== > ________________________________________________________________ ERROR > collecting setup.py > _________________________________________________________________ > setup.py:109: in > setup(**args) > /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py:139: > in setup > raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg > E SystemExit: usage: py.test [global_opts] cmd1 [cmd1_opts] [cmd2 > [cmd2_opts] ...] > E or: py.test --help [cmd1 cmd2 ...] > E or: py.test --help-commands > E or: py.test cmd --help > E > E error: option --doctest-modules not recognized > =========================================================== 46 passed, 1 > error in 15.08 seconds > ============================================================ You can checkout this commit to see what's going on. If you need any more information, please let me know. There is a second problem. When I try to run "py.test --doctest-modules" after activating the virtualenv (source .tox/py27/bin/activate, e.g.), the doctests are being discovered immediately. But when I try to run them as part of the tox command (which runs "python setup.py test" which in turn uses a TestCommand to run pytests), the discover of doctests is taking about 15s. It would be nice to be able to also fix that. I searched StackOverflow, but there're quite a few pytest-doctest questions there that have been unanswered, so I'm emailing this list directly. Regards, Sravan -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at merlinux.eu Mon Apr 20 15:58:21 2015 From: holger at merlinux.eu (holger krekel) Date: Mon, 20 Apr 2015 13:58:21 +0000 Subject: [pytest-dev] Pytest + Doctest + Tox In-Reply-To: References: Message-ID: <20150420135821.GS15735@merlinux.eu> Hi Sravan, On Mon, Apr 20, 2015 at 08:59 -0400, Sravan Bhamidipati wrote: > Hello pytesters, > > I am trying to get guessit to adopt > pytest this month. It uses tox. When I try to run the tests with the > "--doctest-modules" option, the tests are being discovered as expected, but > the run fails with the following error: > > ========================================================================== > > ERRORS > > ========================================================================== > > ________________________________________________________________ ERROR > > collecting setup.py > > _________________________________________________________________ > > setup.py:109: in > > setup(**args) > > /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py:139: > > in setup > > raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg > > E SystemExit: usage: py.test [global_opts] cmd1 [cmd1_opts] [cmd2 > > [cmd2_opts] ...] > > E or: py.test --help [cmd1 cmd2 ...] > > E or: py.test --help-commands > > E or: py.test cmd --help > > E > > E error: option --doctest-modules not recognized > > =========================================================== 46 passed, 1 > > error in 15.08 seconds > > ============================================================ > > > You can checkout this commit > > to see what's going on. If you need any more information, please let me > know. It seems that ``setup.py`` is collected, not protected by ``if __name__ == "__main__":`` and thus executes during collection as a side effect of importing it. You could add the protection which should suffice. You could also add "--ignore=setup.py" to to the pytest invocation (possibly also via the "addopts" config variable). > There is a second problem. When I try to run "py.test --doctest-modules" > after activating the virtualenv (source .tox/py27/bin/activate, e.g.), the > doctests are being discovered immediately. But when I try to run them as > part of the tox command (which runs "python setup.py test" which in turn > uses a TestCommand to run pytests), the discover of doctests is taking > about 15s. It would be nice to be able to also fix that. I suspect that "python setup.py test" somehow ends up traversing way more directories and files than your pytest invocation, but not sure. You could try to specify the particular directories (the package and the test directories) to avoid traversing too much. hope it helps, holger > > I searched StackOverflow, but there're quite a few pytest-doctest questions > there that have been unanswered, so I'm emailing this list directly. > > Regards, > Sravan > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev -- about me: http://holgerkrekel.net/about-me/ contracting: http://merlinux.eu From brianna.laugher at gmail.com Mon Apr 20 23:16:11 2015 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Mon, 20 Apr 2015 23:16:11 +0200 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: References: <20150414073346.GP15735@merlinux.eu> <552D67D4.1040902@hackebrot.de> Message-ID: I submitted an abstract for 'The realities of open source testing: lessons learned from ?Adopt pytest month?'. Anyone else had any further thoughts? cheers Brianna On 14 April 2015 at 22:34, Brianna Laugher wrote: > That's good news Raphael :) > > Thanks for the positive feedback, everyone. Here is my draft proposal, > please make any comments on the google doc (or in email to me if you > don't use google) > https://docs.google.com/document/d/14YXXh452Aypw_MZ9u0ebv_cMQrEXfk5gJKX4zfXasAc/edit?usp=sharing > > You can also volunteer for the Help desk! > https://ep2015.europython.eu/en/call-for-proposals/ It sounds like > quite a cool idea, and anyone who volunteered for Adopt pytest month > would be well qualified for it I think :) > > cheers > Brianna > > On 14 April 2015 at 21:17, Raphael Pierzina wrote: >> Hi, >> >> The CFP for EP2015 has been extended until 2015-04-28! >> http://blog.europython.eu/post/116392207002/europython-2015-call-for-proposals-has-been >> >> Raphael >> >> >> On 14.04.2015 09:33, holger krekel wrote: >>> >>> Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, >>> >>> Today the CFP for EP2015 in Bilbao ends. Did you submit talks? >>> I am pondering something pytest or tox or devpi related, maybe a training. >>> I'd like to make sure we don't overlap too much or even complement each >>> other. >>> >>> best, >>> holger >>> _______________________________________________ >>> 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 > > > > -- > They've just been waiting in a mountain for the right moment: > http://modernthings.org/ -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ From brianna.laugher at gmail.com Mon Apr 20 23:27:39 2015 From: brianna.laugher at gmail.com (Brianna Laugher) Date: Mon, 20 Apr 2015 23:27:39 +0200 Subject: [pytest-dev] pytest-2.7.1 / bugs? / release? In-Reply-To: <20150418071706.GI15735@merlinux.eu> References: <20150418071706.GI15735@merlinux.eu> Message-ID: Yep, sounds good. I could maybe try to do the release but to be honest I would prefer someone else to be the guinea pig first :) Brianna On 18 April 2015 at 09:17, holger krekel wrote: > Hi all, > > what about we try to do a little pytest-2.7.1 release in like 10 days or so? > > Two suggestions for that: > > - everyone picks and fixes (at least) one bug within the next 7 days > (everyone == (committers + anyone) willing to help) > > - someone other than me does the release (i'll be around to help > if questions arise) according to doc/en/release.txt > > Meanwhile i am working on adding wheel support to "devpi test" so that > we can publish wheels as well, including for the "py" dependency. > That should hopefully land next week as it experimentally works already. > > best, > holger > > -- > about me: http://holgerkrekel.net/about-me/ > contracting: http://merlinux.eu > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ From flub at devork.be Tue Apr 21 01:20:10 2015 From: flub at devork.be (Floris Bruynooghe) Date: Tue, 21 Apr 2015 00:20:10 +0100 Subject: [pytest-dev] pytest-2.7.1 / bugs? / release? In-Reply-To: References: <20150418071706.GI15735@merlinux.eu> Message-ID: Hi All, I'm up for the fix-a-bug-for-the-next-release thing. And as I mentioned on IRC earlier today I also don't mind being a guinea pig for the release, or we could work on it together as there's plenty of tasks. Not sure if you're on IRC at all usually but we could coordinate there? The pytest-2.7 branch has had some fixes already so I suggest we aim for next Friday and just go with whatever could get merged by then. Unless there's a showstopper of course, but I expect that to be unlikely. Floris On 20 April 2015 at 22:27, Brianna Laugher wrote: > Yep, sounds good. I could maybe try to do the release but to be honest > I would prefer someone else to be the guinea pig first :) > > Brianna > > On 18 April 2015 at 09:17, holger krekel wrote: >> Hi all, >> >> what about we try to do a little pytest-2.7.1 release in like 10 days or so? >> >> Two suggestions for that: >> >> - everyone picks and fixes (at least) one bug within the next 7 days >> (everyone == (committers + anyone) willing to help) >> >> - someone other than me does the release (i'll be around to help >> if questions arise) according to doc/en/release.txt >> >> Meanwhile i am working on adding wheel support to "devpi test" so that >> we can publish wheels as well, including for the "py" dependency. >> That should hopefully land next week as it experimentally works already. >> >> best, >> holger >> >> -- >> about me: http://holgerkrekel.net/about-me/ >> contracting: http://merlinux.eu >> _______________________________________________ >> pytest-dev mailing list >> pytest-dev at python.org >> https://mail.python.org/mailman/listinfo/pytest-dev > > > > -- > They've just been waiting in a mountain for the right moment: > http://modernthings.org/ > _______________________________________________ > pytest-dev mailing list > pytest-dev at python.org > https://mail.python.org/mailman/listinfo/pytest-dev From willingc at willingconsulting.com Tue Apr 21 01:44:20 2015 From: willingc at willingconsulting.com (Carol Willing) Date: Mon, 20 Apr 2015 16:44:20 -0700 Subject: [pytest-dev] EP2015 -- Bilbao CFP ends today In-Reply-To: References: <20150414073346.GP15735@merlinux.eu> <552D67D4.1040902@hackebrot.de> Message-ID: <55358F54.9050506@willingconsulting.com> Brianna, Great talk proposal. It's a talk that I would like to attend. I do think April was a tough month. I think OpenHatch would have participated if our core developers weren't already overextended due to PyCon. I hope that there will be another round. If there are any best practices or onboarding a project to pytest usage, I would be happy to share with our user group :) Thanks, Carol On 4/20/15 2:16 PM, Brianna Laugher wrote: > I submitted an abstract for 'The realities of open source testing: > lessons learned from ?Adopt pytest month?'. > > Anyone else had any further thoughts? > > cheers > Brianna > > On 14 April 2015 at 22:34, Brianna Laugher wrote: >> That's good news Raphael :) >> >> Thanks for the positive feedback, everyone. Here is my draft proposal, >> please make any comments on the google doc (or in email to me if you >> don't use google) >> https://docs.google.com/document/d/14YXXh452Aypw_MZ9u0ebv_cMQrEXfk5gJKX4zfXasAc/edit?usp=sharing >> >> You can also volunteer for the Help desk! >> https://ep2015.europython.eu/en/call-for-proposals/ It sounds like >> quite a cool idea, and anyone who volunteered for Adopt pytest month >> would be well qualified for it I think :) >> >> cheers >> Brianna >> >> On 14 April 2015 at 21:17, Raphael Pierzina wrote: >>> Hi, >>> >>> The CFP for EP2015 has been extended until 2015-04-28! >>> http://blog.europython.eu/post/116392207002/europython-2015-call-for-proposals-has-been >>> >>> Raphael >>> >>> >>> On 14.04.2015 09:33, holger krekel wrote: >>>> Hey Floris, Brianna, Ronny, Anatoly, Andreas, all, >>>> >>>> Today the CFP for EP2015 in Bilbao ends. Did you submit talks? >>>> I am pondering something pytest or tox or devpi related, maybe a training. >>>> I'd like to make sure we don't overlap too much or even complement each >>>> other. >>>> >>>> best, >>>> holger >>>> _______________________________________________ >>>> 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 >> >> >> -- >> They've just been waiting in a mountain for the right moment: >> http://modernthings.org/ > > -- *Carol Willing* Developer | Willing Consulting https://willingconsulting.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sb3400 at columbia.edu Tue Apr 21 15:05:35 2015 From: sb3400 at columbia.edu (Sravan Bhamidipati) Date: Tue, 21 Apr 2015 09:05:35 -0400 Subject: [pytest-dev] Pytest + Doctest + Tox Message-ID: On Mon, Apr 20, 2015 at 7:20 PM, wrote: > It seems that ``setup.py`` is collected, not protected by > ``if __name__ == "__main__":`` and thus executes during collection > as a side effect of importing it. > > You could add the protection which should suffice. > You could also add "--ignore=setup.py" to to the pytest invocation > (possibly also via the "addopts" config variable). > Thank you, Holger. I started using addopts, and it solved both the setup.py error as well as the slow discovery of doctests. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tinchester at gmail.com Thu Apr 23 21:28:52 2015 From: tinchester at gmail.com (=?UTF-8?B?VGluIFR2cnRrb3ZpxIc=?=) Date: Thu, 23 Apr 2015 21:28:52 +0200 Subject: [pytest-dev] Pytest-asyncio Message-ID: <553947F4.5020201@gmail.com> Hello fellow pytest aficionados, I've been advised by multiple people over Twitter to bring this to the attention of the pytest community, so here goes. I'm the author of pytest-asyncio, a pytest plugin for testing asyncio code: https://github.com/Tinche/pytest-asyncio. The code isn't particularly clever, and could use a review by someone more knowledgeable of pytest than me, but it seems to do its job okay (I'm already using it in another asyncio project). Credit where credit is due: the plugin is basically a port of pytest-tornado to asyncio. It's up on PyPI under the name 'pytest-asyncio'. Hopefully the README file is documentation enough. It's also been suggested to me to submit the plugin to pytest, which I'd totally be open to if you folks are interested. I think the plugin ticks all the checkboxes listed on https://pytest.org/latest/contributing.html. Kind regards, Tin From lac at openend.se Thu Apr 23 21:55:28 2015 From: lac at openend.se (Laura Creighton) Date: Thu, 23 Apr 2015 21:55:28 +0200 Subject: [pytest-dev] Pytest-asyncio In-Reply-To: Message from =?UTF-8?B?VGluIFR2cnRrb3ZpxIc=?= of "Thu, 23 Apr 2015 21:28:52 +0200." <553947F4.5020201@gmail.com> References: <553947F4.5020201@gmail.com> Message-ID: <201504231955.t3NJtS0L025670@fido.openend.se> In a message of Thu, 23 Apr 2015 21:28:52 +0200, Tin Tvrtkovi? writes: >Hello fellow pytest aficionados, > >I've been advised by multiple people over Twitter to bring this to the >attention of the pytest community, so here goes. > >I'm the author of pytest-asyncio, a pytest plugin for testing asyncio >code: https://github.com/Tinche/pytest-asyncio. The code isn't >particularly clever, and could use a review by someone more >knowledgeable of pytest than me, but it seems to do its job okay (I'm >already using it in another asyncio project). Credit where credit is >due: the plugin is basically a port of pytest-tornado to asyncio. It's >up on PyPI under the name 'pytest-asyncio'. Hopefully the README file is >documentation enough. > >It's also been suggested to me to submit the plugin to pytest, which I'd >totally be open to if you folks are interested. I think the plugin ticks >all the checkboxes listed on https://pytest.org/latest/contributing.html. > >Kind regards, >Tin I've been using it, for about a week. It is working great here. so +1 from me. Laura From nicoddemus at gmail.com Thu Apr 23 22:05:59 2015 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Thu, 23 Apr 2015 17:05:59 -0300 Subject: [pytest-dev] Pytest-asyncio In-Reply-To: <201504231955.t3NJtS0L025670@fido.openend.se> References: <553947F4.5020201@gmail.com> <201504231955.t3NJtS0L025670@fido.openend.se> Message-ID: I'm +1 too, it fits all of the requirements. :) Tin, I've invited you over to pytest-dev, feel free to transfer the repository. On Thu, Apr 23, 2015 at 4:55 PM, Laura Creighton wrote: > In a message of Thu, 23 Apr 2015 21:28:52 +0200, Tin Tvrtkovi? writes: > >Hello fellow pytest aficionados, > > > >I've been advised by multiple people over Twitter to bring this to the > >attention of the pytest community, so here goes. > > > >I'm the author of pytest-asyncio, a pytest plugin for testing asyncio > >code: https://github.com/Tinche/pytest-asyncio. The code isn't > >particularly clever, and could use a review by someone more > >knowledgeable of pytest than me, but it seems to do its job okay (I'm > >already using it in another asyncio project). Credit where credit is > >due: the plugin is basically a port of pytest-tornado to asyncio. It's > >up on PyPI under the name 'pytest-asyncio'. Hopefully the README file is > >documentation enough. > > > >It's also been suggested to me to submit the plugin to pytest, which I'd > >totally be open to if you folks are interested. I think the plugin ticks > >all the checkboxes listed on https://pytest.org/latest/contributing.html. > > > >Kind regards, > >Tin > > I've been using it, for about a week. It is working great here. > so +1 from me. > > Laura > _______________________________________________ > 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: