Skip to content

Tox: replace setup.py test with unittest discover #335

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

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

tiran
Copy link
Member

@tiran tiran commented May 27, 2020

setup.py test is deprecated and causes issues with testing our code.
There are cases where the wrong shared library is picked up.

The unittest discover approach avoids building the extension twice.

python-ldap should move to pytest eventually.

Fixes: #326
Signed-off-by: Christian Heimes cheimes@redhat.com

@tiran tiran requested a review from encukou May 27, 2020 14:43
@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #335 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
+ Coverage   71.38%   71.42%   +0.03%     
==========================================
  Files          49       49              
  Lines        4837     4714     -123     
  Branches      808      785      -23     
==========================================
- Hits         3453     3367      -86     
+ Misses       1050     1027      -23     
+ Partials      334      320      -14     
Impacted Files Coverage Δ
Modules/options.c 83.20% <0.00%> (-2.40%) ⬇️
Modules/constants_generated.h 98.59% <0.00%> (+0.66%) ⬆️
Modules/LDAPObject.c 67.52% <0.00%> (+1.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8fd053...68bfc62. Read the comment docs.

@tiran
Copy link
Member Author

tiran commented May 27, 2020

The changeset breaks coverage and codecov. Back to the drawing board!

@tiran tiran added the tests label May 27, 2020
@tiran tiran added this to the 3.3 milestone May 27, 2020
@tiran tiran force-pushed the tox_test branch 2 times, most recently from 478da41 to da85e98 Compare May 29, 2020 13:13
@tiran
Copy link
Member Author

tiran commented Jun 5, 2020

Let's try coverage 5.1

setup.py test is deprecated and causes issues with testing our code.
There are cases where the wrong shared library is picked up.

The ``unittest discover`` approach avoids building the extension twice.

Install coverage < 5.0 to work around a problem with sqlite.

python-ldap should move to pytest eventually.

Fixes: python-ldap#326
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@encukou
Copy link
Member

encukou commented Jun 5, 2020

For some reason, Travis CI is not reporting results. But the build for 68bfc62 passed: https://travis-ci.org/github/python-ldap/python-ldap/builds/695111114

@encukou encukou merged commit def231c into python-ldap:master Jun 5, 2020
@hroncok
Copy link
Contributor

hroncok commented Jun 5, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tox does not test the installed extension module
3 participants