diff options
author | Leonardo Tarla <41342687+leo8198@users.noreply.github.com> | 2022-08-18 11:57:45 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 16:57:45 +0200 |
commit | 760215f0a2552f37b4e9b86b02ef0632bc23d1df (patch) | |
tree | 6cc128b17c8f70a67c5ca67cb82444a0e821bdb9 /tests | |
parent | 6ba0a3a60e3ab85ec85e260fd70b3bc3770ec53c (diff) |
Test code in example folder (#28)
* Unit tests for the examples using pytest
Co-authored-by: Leonardo Ferreira Tarlá <leonardo.tarla@ringa.com.br>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_examples.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_examples.py b/tests/test_examples.py new file mode 100644 index 0000000..699da18 --- /dev/null +++ b/tests/test_examples.py @@ -0,0 +1,11 @@ +from examples.quotes_to_scrape import main as quotes_to_scrape_main + +# Example 1 - Quotes to scrape +def test_example_quotes_to_scrape(): + ''' + Test if the example quotes_to_scrape.py works + ''' + + assert quotes_to_scrape_main() == \ + {'name': 'J.K. Rowling', 'born': 'July 31, 1965'}, \ + 'Quotes to scrape example failed' |