Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage pyfepdf #71

Merged
merged 11 commits into from
Aug 11, 2021
Merged

Coverage pyfepdf #71

merged 11 commits into from
Aug 11, 2021

Conversation

chazuttu
Copy link
Collaborator

@chazuttu chazuttu commented Jul 26, 2021

Summary

This PR adds unit tests for the script pyfepdf.py and also increase the coverage for this script.
For the above purpose, some additional files are also modified.

  • added unit tests for pyfepdf.py
  • increased coverage to 80% on python 3

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_pyfepdf.py

============================ test session starts ======================
platform win32 -- Python 3.9.6, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: C:\User\Week_7_GSOC\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 14 items

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


----------- coverage: platform win32, python 3.9.6-final-0 -----------
Name                                                                              Stmts   Miss  Cover
-----------------------------------------------------------------------------------------------------
test3\Lib\site-packages\PyAfipWs-3.9.b_2500_-py3.9.egg\pyafipws\__init__.py           4      0   100%
test3\Lib\site-packages\PyAfipWs-3.9.b_2500_-py3.9.egg\pyafipws\pyfepdf.py          802    162    80%

======================= 14 passed, 2 warnings in 5.86s ============================

Python 2

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

============================= test session starts =============================
platform win32 -- Python 2.7.18, pytest-4.6.11, py-1.10.0, pluggy-0.13.1
rootdir: C:\UsersDesktop\Week_7_GSOC\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 14 items

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



---------- coverage: platform win32, python 2.7.18-final-0 -----------
Name                                                                           Stmts   Miss  Cover
--------------------------------------------------------------------------------------------------
test2\Lib\site-packages\PyAfipWs-2.7.2500-py2.7.egg\pyafipws\__init__.py           4      0   100%
test2\Lib\site-packages\PyAfipWs-2.7.2500-py2.7.egg\pyafipws\pyfepdf.py          801    286    64%


==================== 14 passed, 1 warnings in 3.67 seconds ====================

chazuttu and others added 4 commits July 13, 2021 06:06
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
@chazuttu chazuttu requested a review from reingart July 26, 2021 14:01
Copy link
Member

@reingart reingart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chazuttu , the PR is very good!
I left some comments, please take a look and let me know if you need something to address them

.coveragerc Show resolved Hide resolved
formatos/formato_json.py Outdated Show resolved Hide resolved
formatos/formato_txt.py Show resolved Hide resolved
pyfepdf.py Outdated Show resolved Hide resolved
pyfepdf.py Outdated Show resolved Hide resolved
tests/test_pyfepdf.py Outdated Show resolved Hide resolved
tests/test_pyfepdf.py Outdated Show resolved Hide resolved
tests/test_pyfepdf.py Show resolved Hide resolved
tests/test_pyfepdf.py Show resolved Hide resolved
tests/test_pyfepdf.py Outdated Show resolved Hide resolved
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
Signed-off-by: UTKARSH KUMAR <Utkarshdhsbgp@gmail.com>
@reingart reingart merged commit bf0fbf6 into PyAr:main Aug 11, 2021
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