Skip to content
This repository was archived by the owner on Jul 6, 2024. It is now read-only.

younata/python_shared_context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shared Context

Simplify the process of adding shared tests for python code.

Usage

@behaves_like

This is a class-level annotation that adds tests to the unittest.TestCase subclass. It takes as input a list of functions that each take the self argument. These functions will automatically have test_ prepended to them, so you don't have to do that.

You can also optionally specify kwargs to be passed in to all functions (as kwargs).

See the tests for examples of using this.

About

Shared tests between unittest TestCases

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages