14 Commits

Author SHA1 Message Date
Olivier Ramonat
438381a447 Create a pytest plugin to reuse fixtures in other projects
Remove deprecated requirements traceability which is not maintained.
Create e3.pytest to reuse part of the code in conftest.py in other
projects.
Document the new plugin.
2024-03-26 18:07:55 +01:00
Frederic Leger
d2de4394bb Added a missing package class
The `PackageHomePage` class was missing from the available package information
classed.

Some typos and warnings fixed too.

The `@abstractmethod` have been added to the coverage configuration since
they may not be tested.
2023-11-16 18:14:01 +01:00
Olivier Ramonat
70a38aea9f Reduce coverage target to pass the tests on the 22.3 branch 2023-03-17 12:25:03 +01:00
Olivier Ramonat
d1c34e963f Add assert_never
assert_never can be used to perform an exhaustive check of a union or
of literal values, for instance:

def handle_my_union(x: Union[A, B, C]) -> None:
    if isinstance(x, A): ...
    elif isinstance(x, B): ...
    else:
       assert_never()

will raise a type error but not

def handle_my_union(x: Union[A, B, C]) -> None:
    if isinstance(x, A): ...
    elif isinstance(x, B): ...
    elif isinstance(x, C): ...
    else:
       assert_never()

TN: TC11-023
2020-12-11 17:24:44 +01:00
Olivier Ramonat
06fa98fb8b Fail if coverage in under 94 percent 2020-12-11 17:23:44 +01:00
Olivier Ramonat
303a05ca67 Do not cover lines under if TYPE_CHECKING:
Type annotations do not need to be covered.
2020-03-26 09:43:23 +01:00
Olivier Ramonat
59fdd788a0 Remove code that was python2 specific 2020-03-12 13:33:02 +01:00
Olivier Ramonat
50ac570baf Move e3/binarydata to a separate repository
See https://github.com/AdaCore/e3-binarydata
2017-06-14 10:27:16 +02:00
Olivier Ramonat
661b71a1fd Don't try to cover all OS specific branches 2017-06-06 20:54:52 +02:00
Olivier Ramonat
9fa0b6282d Don't cover macho on linux/windows 2017-03-06 13:47:19 -05:00
Olivier Ramonat
fa7feedb8c Automatically generate coverage exclude_lines 2017-03-01 16:39:47 -05:00
Olivier Ramonat
280ffdb4ea Add coverage annotations for e3.os.platform 2017-02-18 14:40:34 +01:00
Olivier Ramonat
dd1f8b7db7 Fix exclusion of e3.os.unix modules
Change-Id: Ia0a36dcf6c749fbbdab52bc6d49b07f2fee61a70
2016-10-18 22:13:53 +02:00
Olivier Ramonat
68053bb520 Rework coverage script to report nicer results
Hack .coverage in order to get good looking paths, we want to
report the path starting with e3 and not exactly what we're
testing (which is .tox/*/lib/python*/site-packages/e3 on UNIX).

Generate a .coveragerc file so that calls to coverage report
works out of the box.

Change-Id: I342f0667358f6ff165e8ecff2b3f5ad8cf790945
2016-10-14 11:16:17 +02:00