mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 21:44:16 +02:00
M3 namespace migration: complete Phase B, partial Phase D, docs and tests
- Native runtime under bearhub/ (api, commons, gems, view/util, view/core, view/qt) - bauh/ compatibility re-export shims for legacy imports - Phase D: canonical __version__/__app_name__ in bearhub/__init__.py; pyproject.toml and setup.py point at bearhub package - Native gem loader at bearhub/view/core/gems.py - Namespace compatibility tests (159 tests passing) - Documentation: CHANGELOG [Unreleased], NAMESPACE_MIGRATION, ROADMAP, README, CONTRIBUTING, docs/qt6-migration.md, packaging/aur/README.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from bauh.api.abstract.model import PackageUpdate
|
||||
from bearhub.api.abstract.model import PackageUpdate
|
||||
|
||||
|
||||
class PackageUpdateTest(TestCase):
|
||||
|
||||
17
tests/api/test_namespace.py
Normal file
17
tests/api/test_namespace.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from bearhub.api.paths import CONFIG_DIR, CACHE_DIR
|
||||
from bearhub.commons.util import size_to_byte
|
||||
|
||||
|
||||
class TestApiNamespace(TestCase):
|
||||
|
||||
def test_bauh_compat_api_import(self):
|
||||
from bauh.api.paths import CONFIG_DIR as legacy_config
|
||||
|
||||
self.assertEqual(legacy_config, CONFIG_DIR)
|
||||
|
||||
def test_bauh_compat_commons_import(self):
|
||||
from bauh.commons.util import size_to_byte as legacy_size
|
||||
|
||||
self.assertEqual(legacy_size(1, 'K'), size_to_byte(1, 'K'))
|
||||
Reference in New Issue
Block a user