Skip to content

cantwellnc/testing-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testing-examples

exploring different tools for testing in Python, particularly property-based testing.

basic example is exploring a purposefully flawed string-reversal algorithm in src/reversal.py and `src/tests/reversal_test

  • note: I claim that the properties we list uniquely characterize a string reversal algorithm; this is not true! we need a properties that asserts that the indices move in the appropriate way. Otherwise, a Caesar cipher with a shift of 13 also satisfies these properties.

more advanced exmaple that incorporates mocking + a fake usecase of detecting PII (Personally Identifiable Information) in an AWS account is in src/main.py and src/tests/main_property_based_test.py.

there are also some examples of other testing tools (snapshot testing w syrupy). feel free to explore those too!

About

exploring different tools for testing in Python, particularly property-based testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages