Closed nicoddemus closed 10 months ago
What is the command or setup you use to start the plugin tests?
I'm hitting the same issue:
tox.ini
:
[tox]
envlist = py38
skipsdist = True
[testenv]
commands = py.test {posargs}
deps =
mock
pytest
pytest-pep8
-r{toxinidir}/requirements.txt
[pytest]
norecursedirs = .* data helm venv errbot
Running tox
fails, so does pytest mybot/test_tz.py
mybot/test_tz.py
:
from . import tz
pytest_plugins = ["errbot.backends.test"]
extra_plugin_dir = '.'
def test_time(testbot):
testbot.push_message('!time')
assert 'This is my awesome command' in testbot.pop_message()
Full log output from pytest -v -x mybot/test_tz.py
is at https://gist.github.com/rcoup/4d66f9fd4da401e0604673ac18a01340
this happens to me because I have my myplugin.plug
and myplugin.py
files in the same place where I have my .venv
.
In the tests
directory I have a test that does;
test.TestBot(extra_plugin_dir=os.path.join(os.path.dirname(__file__), '..'))
Then, TestBot does a glob to find all the files with .plug
, finding myplugin
, but also all the plugins installed in the .venv
with errbot.
It would be more useful if I can tell TestBot to load only my plugin, by name.
bump.
PySides has been removed in https://github.com/errbotio/errbot/pull/1495
Seems no longer relevant.
In order to let us help you better, please fill out the following fields as best you can:
I am...
I am running...
Issue description
I use the
testbot
fixture to run my tests. Since upgradeerr-bot
from5.2
to6.1.2
, I see this error when executing the tests in my environment:It seems the default for backends has changed to "graphic". If I install
errbot-5.2
then my tests pass as expected.My question is: how do I change the backend of
testbot
totext
?Also, shouldn't the backend for
testbot
betext
by default?