kernelci / kernelci/kcidb

Test that package modules are accessible as symbols

Open
#404 2 comments 0 reactions 1 assignee Claimed by @octonawish-akcodes View on GitHub
good second issue
Dominant language
Python
Stars
26
Forks
40
PR merge metrics
No merged PRs in 30d

Description

We'd like to be able to access the package modules as symbols after importing the package's module (`__init__.py`).

I.e. given the `kcidb` package contains the `db` module, this should work:

```python
import kcidb
print(kcidb.db)
```
Most of the code is already built that way. However, we don't have any tests verifying that.

Add a test to `test_kcidb.py` which starts with the `kcidb` package, lists modules under it (e.g. using `pkgutil`, like in [`kcidb.monitor.subscriptions`](https://github.com/kernelci/kcidb/blob/main/kcidb/monitor/subscriptions/__init__.py)), imports the package and verifies that each listed module is available as a symbol with type `` inside it, then continues to all sub-packages recursively, until everything is verified.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.