On 1/27/17 at 10:26 AM, [email protected] (Bert JW Regeer) pronounced:

On Jan 27, 2017, at 08:42, Jonathan Vanasco <[email protected]> wrote:



On Thursday, January 26, 2017 at 1:39:50 AM UTC-5, Steve Piercy wrote:
I'd be interested in hearing more, both for and against, about a switch.
A strength of Pyramid is that you can complete a task in almost any way 
imaginable.  This
translates to a bit of a weakness though, in that "testing" usually requires a bit of structure.

Without commenting on a "switch", i'd like to advocate that the cookiecutter 
templates
included more sample tests that are somewhat structured for "best practices". right now, it looks like the sample tests are limited to checking for cookies.

I think it might be beneficial if the templates generated more tests that could 
serve as
examples and "good practices" to extend on for different types of testing 
situations:

• A test that checks for the response having correct content
• A test that checks some CRUD at a low-level
• A test that checks come CRUD at a high-level, by simulating browser flow 
(form view,
form submit, check the database)

Perhaps the scaffold could also prep for tox to run the test suite as well.  
(and hey,
maybe set it up a flake8 section in a 'setup.cfg' too?)

While the tests would break once anyone changes the code, that would prompt 
them to
edit/replace/write-new tests.

(sorry if this is a double post, browser crashed. though i may have been logged 
in as my
wife...)


I’d definitely be interested in seeing what this looks like, do you have a PR for the Pyramid cookie cutter?

For the CRUD tests, use this repo:
https://github.com/Pylons/pyramid-cookiecutter-alchemy

More test examples for the cookiecutters are welcome.
https://github.com/Pylons/pyramid/issues/2868

We have a long list of issues that mention the need for more tests in Pyramid docs.
https://github.com/Pylons/pyramid/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20test

--steve

------------------------
Steve Piercy, Soquel, CA

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/r473Ps-10122i-76D7649902F8408EAF2E4573C34DCB22%40Steves-iMac.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to