Test and Code: 87: Paths to Parametrization – from one test to many

There’s a cool feature of pytest called parametrization.
It’s totally one of the superpowers of pytest.

It’s actually a handful of features, and there are a few ways to approach it.
Parametrization is the ability to take one test, and send lots of different input datasets into the code under test, and maybe even have different output checks, all within the same test that you developed in the simple test case.

Super powerful, but something since there’s a few approaches to it, a tad tricky to get the hang of.

Sponsored By:

Support Test & Code – Python Testing & Development

Links:

<p>There&#39;s a cool feature of pytest called parametrization.<br> It&#39;s totally one of the superpowers of pytest.</p> <p>It&#39;s actually a handful of features, and there are a few ways to approach it.<br> Parametrization is the ability to take one test, and send lots of different input datasets into the code under test, and maybe even have different output checks, all within the same test that you developed in the simple test case.</p> <p>Super powerful, but something since there&#39;s a few approaches to it, a tad tricky to get the hang of.</p><p>Sponsored By:</p><ul><li><a href=”https://testandcode.com/pycharm” rel=”nofollow”>PyCharm Professional</a>: <a href=”https://testandcode.com/pycharm” rel=”nofollow”>Try PyCharm Pro for 4 months. Offer good through June 10. Try out Pro features like integrated coverage and profiling, and extended support for Django, Flask, Pyramid, Cython, and more.</a> Promo Code: TESTNCODE2019</li></ul><p><a href=”https://www.patreon.com/testpodcast” rel=”payment”>Support Test & Code – Python Testing & Development</a></p><p>Links:</p><ul><li><a href=”https://docs.pytest.org/en/latest/changelog.html” title=”pytest changelog” rel=”nofollow”>pytest changelog</a></li><li><a href=”https://docs.pytest.org/en/latest/deprecations.html#deprecations” title=”pytest deprecations and removals” rel=”nofollow”>pytest deprecations and removals</a></li><li><a href=”https://pragprog.com/book/bopytest/python-testing-with-pytest” title=”Python Testing with pytest” rel=”nofollow”>Python Testing with pytest</a> &mdash; Test function parametrization is in chapter 2. Fixture parametrization is in chapter 3.</li><li><a href=”https://docs.pytest.org/en/latest/parametrize.html” title=”Parametrizing test functions — pytest documentation” rel=”nofollow”>Parametrizing test functions — pytest documentation</a></li><li><a href=”https://docs.pytest.org/en/latest/fixture.html#fixture-parametrize” title=”pytest fixtures — pytest documentation” rel=”nofollow”>pytest fixtures — pytest documentation</a></li></ul>
Planet Python

Test and Code: 86: Teaching testing best practices with 4 testing maxims – Josh Peak

You’ve incorporated software testing into your coding practices and know from experience that it helps you get your stuff done faster with less headache.

Awesome.

Now your colleagues want in on that super power and want to learn testing.

How do you help them?

That’s where Josh Peak is. He’s helping his team add testing to their workflow to boost their productivity.

That’s what we’re talking about today on Test & Code.

Josh walks us through 4 maxims of developing software tests that help grow your confidence and proficiency at test writing.

Special Guest: Josh Peak.

Sponsored By:

Support Test & Code – Python Testing & Development

Links:

<p>You&#39;ve incorporated software testing into your coding practices and know from experience that it helps you get your stuff done faster with less headache.</p> <p>Awesome.</p> <p>Now your colleagues want in on that super power and want to learn testing.</p> <p>How do you help them? </p> <p>That&#39;s where Josh Peak is. He&#39;s helping his team add testing to their workflow to boost their productivity. </p> <p>That&#39;s what we&#39;re talking about today on Test &amp; Code.</p> <p>Josh walks us through 4 maxims of developing software tests that help grow your confidence and proficiency at test writing.</p><p>Special Guest: Josh Peak.</p><p>Sponsored By:</p><ul><li><a href=”https://raygun.com” rel=”nofollow”>Raygun</a>: <a href=”https://raygun.com” rel=”nofollow”>Detect, diagnose, and destroy Python errors that are affecting your customers. With smart Python error monitoring software from Raygun, you can be alerted to issues affecting your users the second they happen.</a></li></ul><p><a href=”https://www.patreon.com/testpodcast” rel=”payment”>Support Test & Code – Python Testing & Development</a></p><p>Links:</p><ul><li><a href=”https://joshpeak.net/posts/2019-07-22-from-zero-to-test.html” title=”From Zero to Test: Turning hurdles into steps. ” rel=”nofollow”>From Zero to Test: Turning hurdles into steps. </a></li><li><a href=”https://joshpeak.net/posts/2019-06-18-Advanced-python-testing.html” title=”Advanced Python Testing” rel=”nofollow”>Advanced Python Testing</a> &mdash; Posts</li><li><a href=”https://pypi.org/project/pytest-vcr/” title=”pytest-vcr” rel=”nofollow”>pytest-vcr</a></li><li><a href=”https://vcrpy.readthedocs.io/en/latest/” title=”VCR.py” rel=”nofollow”>VCR.py</a></li><li><a href=”https://pypi.org/project/pytest-randomly/” title=”pytest-randomly” rel=”nofollow”>pytest-randomly</a></li></ul>
Planet Python

Test and Code: 84: CircuitPython – Scott Shawcroft

Adafruit enables beginners to make amazing hardware/software projects.
With CircuitPython, these projects can now use Python.

The combination of Python’s ease of use and Adafruit’s super cool hardware and a focus on a successful beginner experience makes learning to write code that controls hardware super fun.

In this episode, Scott Shawcroft, the project lead, talks about the past, present, and future of CircuitPython, and discusses the focus on the beginner.

We also discuss contributing to the project, testing CircuitPython, and many of the cool projects and hardware boards that can use CircuitPython, and Blinka, a library to allow you to use "CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython," including Raspberry Pi.

Special Guest: Scott Shawcroft.

Sponsored By:

Links:

<p>Adafruit enables beginners to make amazing hardware/software projects.<br> With CircuitPython, these projects can now use Python.</p> <p>The combination of Python&#39;s ease of use and Adafruit&#39;s super cool hardware and a focus on a successful beginner experience makes learning to write code that controls hardware super fun.</p> <p>In this episode, Scott Shawcroft, the project lead, talks about the past, present, and future of CircuitPython, and discusses the focus on the beginner.</p> <p>We also discuss contributing to the project, testing CircuitPython, and many of the cool projects and hardware boards that can use CircuitPython, and Blinka, a library to allow you to use &quot;CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython,&quot; including Raspberry Pi.</p><p>Special Guest: Scott Shawcroft.</p><p>Sponsored By:</p><ul><li><a href=”https://www.patreon.com/testpodcast” rel=”nofollow”>Patreon Supporters</a>: <a href=”https://www.patreon.com/testpodcast” rel=”nofollow”>Help support the show with as little as $ 1 per month and be the first to know when new episodes come out.</a></li></ul><p>Links:</p><ul><li><a href=”https://circuitpython.org/” title=”CircuitPython” rel=”nofollow”>CircuitPython</a></li><li><a href=”https://circuitpython.org/downloads” title=”Downloads” rel=”nofollow”>Downloads</a> &mdash; All the products that run CircuitPython</li><li><a href=”https://learn.adafruit.com/category/circuitpython” title=”Learning Guides with CircuitPython” rel=”nofollow”>Learning Guides with CircuitPython</a></li><li><a href=”https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart” title=”Loading CircuitPython on Circuit Playground Express” rel=”nofollow”>Loading CircuitPython on Circuit Playground Express</a></li><li><a href=”https://adafru.it/discord” title=”Adafruit Discord Server” rel=”nofollow”>Adafruit Discord Server</a></li><li><a href=”https://twitter.com/tannewt” title=”Scott Shawcroft (@tannewt) / Twitter” rel=”nofollow”>Scott Shawcroft (@tannewt) / Twitter</a></li><li><a href=”https://pypi.org/project/Adafruit-Blinka/” title=”Adafruit-Blinka ” rel=”nofollow”>Adafruit-Blinka </a></li></ul>
Planet Python

Test and Code: 83: PyBites Code Challenges behind the scenes – Bob Belderbos

Bob Belderbos and Julian Sequeira started PyBites a few years ago.
They started doing code challanges along with people around the world and writing about it.

Then came the codechalleng.es platform, where you can do code challenges in the browser and have your answer checked by pytest tests. But how does it all work?

Bob joins me today to go behind the scenes and share the tech stack running the PyBites Code Challenges platform.

We talk about the technology, the testing, and how it went from a cool idea to a working platform.

Special Guest: Bob Belderbos.

Sponsored By:

Support Test & Code – Python Testing & Development

Links:

<p>Bob Belderbos and Julian Sequeira started <a href=”https://pybit.es/” rel=”nofollow”>PyBites</a> a few years ago.<br> They started doing code challanges along with people around the world and writing about it. </p> <p>Then came the <a href=”https://codechalleng.es/” rel=”nofollow”>codechalleng.es</a> platform, where you can do code challenges in the browser and have your answer checked by pytest tests. But how does it all work?</p> <p>Bob joins me today to go behind the scenes and share the tech stack running the PyBites Code Challenges platform.</p> <p>We talk about the technology, the testing, and how it went from a cool idea to a working platform.</p><p>Special Guest: Bob Belderbos.</p><p>Sponsored By:</p><ul><li><a href=”https://testandcode.com/pycharm” rel=”nofollow”>PyCharm Professional</a>: <a href=”https://testandcode.com/pycharm” rel=”nofollow”>PyCharm is designed by programmers, for programmers, to provide all the tools you need for productive Python development.</a></li></ul><p><a href=”https://www.patreon.com/testpodcast” rel=”payment”>Support Test & Code – Python Testing & Development</a></p><p>Links:</p><ul><li><a href=”https://pybit.es/” title=”PyBites” rel=”nofollow”>PyBites</a></li><li><a href=”https://codechalleng.es/” title=”PyBites Code Challenges coding platform” rel=”nofollow”>PyBites Code Challenges coding platform</a></li><li><a href=”https://codechalleng.es/bites/paths” title=”Learning Paths” rel=”nofollow”>Learning Paths</a></li><li><a href=”https://pybit.es/whiteboard-interviews.html” title=”Julian’s article on whiteboard interviews” rel=”nofollow”>Julian’s article on whiteboard interviews</a></li></ul>
Planet Python

Test and Code: 82: pytest – favorite features since 3.0 – Anthony Sottile

Anthony Sotille is a pytest core contributor, as well as a maintainer and contributor to
many other projects. In this episode, Anthony shares some of the super cool features of pytest that have been added since he started using it.

We also discuss Anthony’s move from user to contributor, and how others can help with the pytest project.

Special Guest: Anthony Sottile.

Sponsored By:

Support Test & Code – Python Testing & Development

Links:

<p>Anthony Sotille is a pytest core contributor, as well as a maintainer and contributor to <br> many other projects. In this episode, Anthony shares some of the super cool features of pytest that have been added since he started using it.</p> <p>We also discuss Anthony&#39;s move from user to contributor, and how others can help with the pytest project.</p><p>Special Guest: Anthony Sottile.</p><p>Sponsored By:</p><ul><li><a href=”https://azure.com/pipelines” rel=”nofollow”>Azure Pipelines</a>: <a href=”https://azure.com/pipelines” rel=”nofollow”>Many organizations and open source projects are using Azure Pipelines already. Get started for free at azure.com/pipelines</a></li></ul><p><a href=”https://www.patreon.com/testpodcast” rel=”payment”>Support Test & Code – Python Testing & Development</a></p><p>Links:</p><ul><li><a href=”https://pytest.org/en/latest/” title=”pytest documentation” rel=”nofollow”>pytest documentation</a></li><li><a href=”http://doc.pytest.org/en/latest/changelog.html” title=”pytest Changelog” rel=”nofollow”>pytest Changelog</a></li><li><a href=”http://doc.pytest.org/en/latest/reference.html#” title=”pytest API Reference” rel=”nofollow”>pytest API Reference</a></li><li><a href=”https://docs.pytest.org/en/latest/sponsor.html” title=”sponsor pytest” rel=”nofollow”>sponsor pytest</a></li><li><a href=”http://doc.pytest.org/en/latest/contributing.html” title=”getting started contributing to pytest” rel=”nofollow”>getting started contributing to pytest</a></li><li><a href=”https://amzn.to/2QnzvUv” title=”the book: Python Testing with pytest” rel=”nofollow”>the book: Python Testing with pytest</a> &mdash; The fastest way to learn pytest</li></ul>
Planet Python