question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create pytest-testslide

See original GitHub issue

Add TestSlide support for pytest:

  • Create the PyPI package.
  • Add integration tests to Makefile for building, installing and using it.
  • Add documentation at doc/ regarding pytest integration.

StrictMock can be used simply by importing it, just document it.

Patching tools require special pytest integration, which can be done with @pytest.fixture. Naming the fixture testslide makes sense:

def test_something(testslide):
  testslide.mock_callable(...)

but this contrasts with its usage at TestSlide’s DSL and Python’s Unittest, which access them via self.mock_callable(...), so this is TBD.

The fixture implementation can be copy / pasta from testslide.TestCase.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
fornellascommented, Apr 7, 2020
0reactions
fornellascommented, Aug 24, 2020

test_aggregated_exceptions should cover it. But I think it is still only reporting the first exception that surfaces, and not reporting all of them. I think you can put test_aggregated_exceptions code at a regular TestCase, and run testslide on it to get the reference error. As long as pytest matches that, we’re gold.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to py.test - Slides
Testing in Python? easy to write; easy to read; easy to run; memory & CPU are not problems; deployment is not a problem...
Read more >
Effective testing with pytest - SlideShare
How we achieve effectivity Using Pytest to its full potential Understanding artifacts: mocks, fixtures. Test phases A test can be divided in 3 ......
Read more >
Customizing your pytest test suite (part 1) - Raphael Pierzina
Create a new fixture large_group based on small_group but return a complete list of adventurers and copy test_small_group to a new ...
Read more >
Talks and Tutorials — pytest documentation
pytest : recommendations, basic packages for testing in Python and Django, Andreu Vallbona, PyconES 2017 (slides in english, video in spanish).
Read more >
How to use PyTest | Python Training | Edureka - YouTube
Getting Started With Pytest Create Your First Test With Pytest Multiple Tests ... SlideShare : https://www. slideshare.net/EdurekaIN #Edureka ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found