Make the test suite collectable
The tests import `adapter` and `platform_config` as top-level modules,
but the plugin root is a package: adapter.py and __init__.py used
package-relative imports that fail in that context, so pytest could not
even collect the suite. Fall back to the absolute import when loaded
outside the package, the way platform_config.py already does.
Configure pytest accordingly: --import-mode=importlib (the default
"prepend" mode derives a package name from the checkout directory, which
is not a valid Python identifier), and restrict collection to our two
test files — vendor/ ships the upstream test suites of certifi and
others, which pytest happily collected too.
The suite now runs: 29 passed, 14 failed. All 14 failures predate this
branch — they reference an API the adapter never had (get_user,
set_presence, set_custom_status, clear_custom_status, supports_threads,
MAX_MESSAGE_LENGTH, edit_message, delete_message: absent on main too),
expect the platform name "chatto" where main already says
"chatto-platform", assert that _get_env_or_extra_str returns None where
main also returns "", or mock the client with MagicMock so awaiting it
raises. Fixing those is a separate change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>