mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +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:
22
tests/gems/appimage/test_namespace.py
Normal file
22
tests/gems/appimage/test_namespace.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from bearhub.gems.appimage.controller import AppImageManager
|
||||
from bearhub.view.core.gems import _discover_gem_dirs, _import_controller_module
|
||||
|
||||
|
||||
class TestAppImageNamespace(TestCase):
|
||||
|
||||
def test_bauh_compat_import(self):
|
||||
from bauh.gems.appimage.util import replace_desktop_entry_exec_command
|
||||
|
||||
self.assertTrue(callable(replace_desktop_entry_exec_command))
|
||||
|
||||
def test_appimage_discovered_under_bearhub(self):
|
||||
gem_dirs = dict(_discover_gem_dirs())
|
||||
self.assertIn('appimage', gem_dirs)
|
||||
self.assertIn('bearhub/gems/appimage', gem_dirs['appimage'].replace('\\', '/'))
|
||||
|
||||
def test_controller_import_prefers_bearhub(self):
|
||||
module = _import_controller_module('appimage')
|
||||
self.assertEqual(module.__name__, 'bearhub.gems.appimage.controller')
|
||||
self.assertIs(module.AppImageManager, AppImageManager)
|
||||
@@ -1,6 +1,6 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from bauh.gems.appimage.util import replace_desktop_entry_exec_command
|
||||
from bearhub.gems.appimage.util import replace_desktop_entry_exec_command
|
||||
|
||||
|
||||
class TestUtil(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user