mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Turn on deprecation warnings in CI
This commit is contained in:
parent
785d74bda4
commit
009e82c9df
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -28,6 +28,9 @@ jobs:
|
||||
python setup/unix-ci.py bootstrap
|
||||
|
||||
- name: Test calibre
|
||||
env:
|
||||
PYTHONWARNINGS: error
|
||||
CALIBRE_SHOW_DEPRECATION_WARNINGS: 1
|
||||
run:
|
||||
python setup/unix-ci.py test
|
||||
|
||||
@ -56,6 +59,9 @@ jobs:
|
||||
run: runuser -u ci -- python setup.py bootstrap --ephemeral --debug --sanitize
|
||||
|
||||
- name: Test calibre
|
||||
env:
|
||||
PYTHONWARNINGS: error
|
||||
CALIBRE_SHOW_DEPRECATION_WARNINGS: 1
|
||||
run: |
|
||||
set -xe
|
||||
runuser -u ci -- python setup.py test --under-sanitize
|
||||
|
@ -34,7 +34,11 @@ class TestImports(unittest.TestCase):
|
||||
full_module_name = full_module_name.rpartition('.')[0]
|
||||
if full_module_name in exclude_modules or ('.' in full_module_name and full_module_name.rpartition('.')[0] in exclude_packages):
|
||||
continue
|
||||
importlib.import_module(full_module_name)
|
||||
try:
|
||||
importlib.import_module(full_module_name)
|
||||
except DeprecationWarning:
|
||||
if 'dbus_export' not in full_module_name and 'dbus_service' not in full_module_name:
|
||||
raise
|
||||
count += 1
|
||||
return count
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user