mirror of
https://github.com/google/bumble.git
synced 2026-06-10 09:02:27 +00:00
Fix test failures
a. `DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead` Updated call in `bumble/smp.py` b. `ModuleNotFoundError: No module named 'bumble.apps'` Updated imports in `tests/import_test.py` c. Added `pytest-html` for easier viewing of test results Added package in `setup.cfg`, and hook in `tasks.py` d. Updated workflows to use `invoke test` This is a partial fix of #81
This commit is contained in:
@@ -53,7 +53,7 @@ test_tasks = Collection()
|
||||
ns.add_collection(test_tasks, name="test")
|
||||
|
||||
@task
|
||||
def test(ctx, filter=None, junit=False, install=False):
|
||||
def test(ctx, filter=None, junit=False, install=False, html=False):
|
||||
# Install the package before running the tests
|
||||
if install:
|
||||
ctx.run("python -m pip install .[test]")
|
||||
@@ -63,6 +63,8 @@ def test(ctx, filter=None, junit=False, install=False):
|
||||
args += "--junit-xml test-results.xml"
|
||||
if filter is not None:
|
||||
args += " -k '{}'".format(filter)
|
||||
if html:
|
||||
args += "--html results.html"
|
||||
ctx.run("python -m pytest {} {}".format(os.path.join(ROOT_DIR, "tests"), args))
|
||||
|
||||
test_tasks.add_task(test, default=True)
|
||||
|
||||
Reference in New Issue
Block a user