LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
403 stars 115 forks source link

Migrate to pytest features #192

Closed kurtmckee closed 2 months ago

kurtmckee commented 2 months ago

This PR introduces the following changes:

Most of this work was mechanical:

Some long strings were wrapped to prepare for the possibility of using code formatters in the future.

STDOUT capture code was replaced with the pytest capsys fixture, which simplified the code in test_ATR.py.


This PR prepares for the possibility of consolidating the live tests in src/smartcard/test/ together with the overall test suite, and using pytest features to control whether the live tests run or not.

This is only a possibility, not a guarantee, but migrating from unittest code to pytest code helps pave the way.

coveralls commented 2 months ago

Coverage Status

coverage: 60.337% (+0.3%) from 60.037% when pulling a9beece89cb61e5524adfeddb772423e59b07e4f on kurtmckee:migrate-to-pytest into 1baa8ea356eb2f6ab682396fcbe49266ff50f03c on LudovicRousseau:master.

LudovicRousseau commented 2 months ago

Have you migrated the code by hand? Or with an automatic tool?

kurtmckee commented 2 months ago

This was done by hand (and with some search and replace) unfortunately.

LudovicRousseau commented 2 months ago

Merged in 1e3c4192e9e05c875c8184e9686a41496a10f6d2

Thanks