Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Steve Piercy
As of Pyramid 1.8, we use py.test in the tutorials, scaffolds, and cookiecutters. https://github.com/Pylons/pyramid/search?utf8=%E2%9C%93=pytest But that's just the test runner, and doesn't address the core matter you bring up. Switching from the setup/teardown to pytest fixtures would be a

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Roman Suzi
I do not know what is so hard about tests in Pyramid. Recently wrote all kinds of tests in Flask (completely new framework for me), and with pytest it is a dream: pytest fixtures and their combination is very intuitive compared to the classic approach (with setup/teardown methods), I was able to

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Jonathan Vanasco
On Tuesday, January 24, 2017 at 4:50:55 PM UTC-5, Steve Piercy wrote: > > Take a look at this step in the SQLAlchemy + URL Dispatch wiki tutorial. > > http://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki2/tests.html > +1 for that tutorial. one of the projects we

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-25 Thread Michael Merickel
On Wed, Jan 25, 2017 at 6:32 AM, Laurent DAVERIO wrote: > OK, it works, provided I reinstate the symlink: > > ldc/ldc/shop --> ldc.shop/ldc/shop > > Python namespace packages are really kludgy, it's a disappointment. > Python is usually smarter... > I won't deny that

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-25 Thread Laurent DAVERIO
> I'll try to get rid of it entirely, as I don't wish to maintain Python > 2.x compatibility. I like to burn my bridges sometimes ;) OK, it works, provided I reinstate the symlink: ldc/ldc/shop --> ldc.shop/ldc/shop Python namespace packages are really kludgy, it's a disappointment. Python is

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-25 Thread Laurent DAVERIO
Thank you Michael, the fact is, I started with Python 2.7 some 4-5 years ago, and migrated to 3.x around mid-2015. The incriminated __init__.py contains only the following lines, as per instructions I had found somewhere (can't remember where): > # this is a namespace package > from pkgutil

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Mikko Ohtamaa
> personnaly I use request.addfinalizer to rollback the transaction : > > https://github.com/CroissanceCommune/autonomie/ > blob/master/autonomie/tests/conftest.py#L300 > > This does work in full weight functional testing, as you need to run a web server in a separate thread from unit test main

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Jaime Sangcap
looks interesting. Im thinking you can also use the Splinter with Behave if you prefer BDD style? I'll keep it on my list and get back when its time for me to do browser test automation. Thanks a lot! On Wednesday, January 25, 2017 at 1:17:43 PM UTC+4, Mikko Ohtamaa wrote: > > For py.test and

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread tonthon
Hi, personnaly I use request.addfinalizer to rollback the transaction : https://github.com/CroissanceCommune/autonomie/blob/master/autonomie/tests/conftest.py#L300 Hope this help Regards -- Gaston Tjebbes http://majerti.fr Le 24/01/2017 à 20:52, Jaime Sangcap a écrit : > Hi everyone! Im

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Mikko Ohtamaa
For py.test and Splinter (over Selenium) based testing you might look for the inspiration here: https://websauna.org/docs/narrative/testing/writing.html#testing-patterns It also comes with patterns how to ramp up WebTest based web server for Selenium. Using py.test and Splinter allows you to

Re: [pylons-discuss] functional test in pyramid using pytest

2017-01-25 Thread Jaime Sangcap
I guess I missed a lot, I have to do the tutorial again and get back. quick tutorial is not that quick at all ;) Thanks a lot. On Wednesday, January 25, 2017 at 1:50:55 AM UTC+4, Steve Piercy wrote: > > Take a look at this step in the SQLAlchemy + URL Dispatch wiki tutorial. > >