• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LudovicRousseau / pyscard / 11067079630 / 1
67%
master: 67%

Build:
DEFAULT BRANCH: master
Ran 27 Sep 2024 08:18AM UTC
Files 62
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Sep 2024 08:15AM UTC coverage: 39.32% (+3.5%) from 35.867%
11067079630.1

push

github

LudovicRousseau
Migrate to pytest features

This PR introduces the following changes:

- Migrate the test suite to use pytest features
- Address a duplicated test name in test_Exceptions.py:
  test_ListReadersException.  The duplicate tests have been merged.

Most of this work was mechanical:

- Remove unittest.TestCase subclass definition lines
- De-dent the class methods
- Remove references to self in the function parameters
- Use regular expressions to search and replace assertions:
  - self.assertEqual(x, y) -> assert x == y
  - self.assertRaises -> pytest.raises
  - self.assertFalse(x) -> assert x is False
  - self.assertIn(x, y) -> assert x in y

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.

76 of 411 branches covered (18.49%)

1180 of 3001 relevant lines covered (39.32%)

0.39 hits per line

Source Files on job 11067079630.1
  • Tree
  • List 0
  • Changed 13
  • Source Changed 0
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 11067079630
  • 1e3c4192 on github
  • Prev Job for on master (#11066836805.1)
  • Next Job for on master (#11070429305.16)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc