Skip to content Skip to sidebar Skip to footer
Showing posts with the label Unit Testing

Condition Coverage In Python

Is there any tool/library that calculate percent of 'condition/decision coverage' of python… Read more Condition Coverage In Python

How To Force Tests To Stop Running A Test Suite After A Specified Test Failed?

I have a test suite written in Selenium Webdriver/Python 2.7 consisting of several test cases. Some… Read more How To Force Tests To Stop Running A Test Suite After A Specified Test Failed?

Define A Pytest Fixture Providing Multiple Arguments To Test Function

With pytest, I can define a fixture like so: @pytest.fixture def foo(): return 'blah' … Read more Define A Pytest Fixture Providing Multiple Arguments To Test Function

Should Python Unittests Be In A Separate Module?

Is there a consensus about the best place to put Python unittests? Should the unittests be included… Read more Should Python Unittests Be In A Separate Module?

Python Unittest: Fail Due To Import From Same Folder

the question seems pretty trivial, but I could not find a single answer to it online. Heres my setu… Read more Python Unittest: Fail Due To Import From Same Folder

Getting Nose To Ignore A Function With 'test' In The Name

The nose discovery process finds all modules whose name starts with test, and within them all funct… Read more Getting Nose To Ignore A Function With 'test' In The Name

How Can I Test Whether My Code Is Throwing The Appropriate Argparse Exceptions?

From this great answer I learned to put argument parsing into its own function to simplify unit tes… Read more How Can I Test Whether My Code Is Throwing The Appropriate Argparse Exceptions?

Extract Hash Seed In Unit Testing

I need to get the random hash seed used by python to replicate failing unittests. If PYTHONHASHSEED… Read more Extract Hash Seed In Unit Testing