Skip to content

Conversation

@chazuttu
Copy link
Collaborator

@chazuttu chazuttu commented Aug 2, 2021

Summary

This PR adds units tests for recex1.py and also increases its coverage

  • added unit tests for recex1.py
  • updated cassettes
  • added entrada_recex1.txt file for testing
  • increased coverage to 83%

Checklist

  • Classes, Variables, function and methods logic ok
  • Comments written explaining what the code does
  • All python code is PEP8 compliant (run black .)
  • No lint issues (run flake8)
  • Test coverage with pytest implemented
  • Reviewers assigned (at least 1 mentor)

Manual test evidence

Python 3

pytest --cov-config=.coveragerc --cov=pyafipws tests/test_wsfexv1_recex1.py

======================= test session starts ================================
platform win32 -- Python 3.9.6, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: C:\Users\pyafipws, configfile: pytest.ini
plugins: cov-2.12.1, freezegun-0.4.2, html-3.1.1, metadata-1.11.0, vcr-1.0.2
collected 8 items

tests\test_wsfexv1_recex1.py ........                                                                                                                                            [100%]


----------- coverage: platform win32, python 3.9.6-final-0 -----------
Name                                                                                       Stmts   Miss  Cover
--------------------------------------------------------------------------------------------------------------
test3\Lib\site-packages\PyAfipWs-3.9.b_2528_-py3.9.egg\pyafipws\__init__.py                    4      0   100%
test3\Lib\site-packages\PyAfipWs-3.9.b_2528_-py3.9.egg\pyafipws\recex1.py                    323     56    83%
--------------------------------------------------------------------------------------------------------------

======================== 8 passed, 2 warnings in 2.03s ============================

Python 2

pytest --cov-config=.coveragerc --cov=pyafipws tests/test_wsfexv1_recex1.py

============================= test session starts =============================
platform win32 -- Python 2.7.18, pytest-4.6.11, py-1.10.0, pluggy-0.13.1
rootdir: C:\Users\pyafipws, inifile: pytest.ini
plugins: cov-2.12.1, freezegun-0.4.2, html-1.22.1, metadata-1.11.0, vcr-1.0.2
collected 8 items

tests\test_wsfexv1_recex1.py ........                                    [100%]

---------- coverage: platform win32, python 2.7.18-final-0 -----------
Name                                                                                    Stmts   Miss  Cover
-----------------------------------------------------------------------------------------------------------
test2\Lib\site-packages\PyAfipWs-2.7.2528-py2.7.egg\pyafipws\__init__.py                    4      0   100%
test2\Lib\site-packages\PyAfipWs-2.7.2528-py2.7.egg\pyafipws\recex1.py                    323     56    83%

==================== 8 passed, 3 warnings in 3.64 seconds =====================

@chazuttu chazuttu requested a review from reingart August 2, 2021 09:09
Signed-off-by: UTKARSH KUMAR <[email protected]>
Signed-off-by: UTKARSH KUMAR <[email protected]>
@reingart reingart merged commit c3d018e into PyAr:main Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants