mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
- 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
22 lines
848 B
Python
22 lines
848 B
Python
from unittest import TestCase
|
|
|
|
from bearhub.gems.web.controller import WebApplicationManager
|
|
from bearhub.view.core.gems import _discover_gem_dirs, _import_controller_module
|
|
|
|
|
|
class TestWebNamespace(TestCase):
|
|
|
|
def test_bauh_compat_import(self):
|
|
from bauh.gems.web.controller import DEFAULT_LANGUAGE_HEADER
|
|
|
|
self.assertEqual('en-US, en', DEFAULT_LANGUAGE_HEADER)
|
|
|
|
def test_web_discovered_under_bearhub(self):
|
|
gem_dirs = dict(_discover_gem_dirs())
|
|
self.assertIn('web', gem_dirs)
|
|
self.assertIn('bearhub/gems/web', gem_dirs['web'].replace('\\', '/'))
|
|
|
|
def test_controller_import_prefers_bearhub(self):
|
|
module = _import_controller_module('web')
|
|
self.assertEqual(module.__name__, 'bearhub.gems.web.controller')
|
|
self.assertIs(module.WebApplicationManager, WebApplicationManager) |