Skip to content

lohanbodevan/hypothesis-use-case

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hypothesis use case Travis Status

This is a simple example to show how to use Hyposthesis library to generates random data to your tests.

Install

    $ make install

Test

    $ make test

Just one unit test like this:

    @given(st.integers(), st.integers())
    def test_ints_sum(self, x, y):
        log.info('Testing {} plus {}'.format(x, y))

        assert x + y == sum_numbers(x, y)

Can be covered by many different inputs:

Tests

About

This is a simple example to show how to use Hypothesis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published