From e9b4700adf8eca7c29df2b2dcd8814e3d53b3fb1 Mon Sep 17 00:00:00 2001 From: richard morris Date: Tue, 2 Apr 2024 06:49:10 +1100 Subject: [PATCH] describe namespace collision --- tests/test_app/test_plugins.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_app/test_plugins.py b/tests/test_app/test_plugins.py index 7f2ada9f8..49a1bd2f1 100644 --- a/tests/test_app/test_plugins.py +++ b/tests/test_app/test_plugins.py @@ -130,9 +130,9 @@ def main(self, data: str) -> str: assert cogent3.app.apps().names() == ["app1", "app1"] with pytest.raises(NameError): - app_by_name = get_app("app1") + _ = get_app("app1") # request app by name only, when there are multiple apps with the same name - app_by_module_name_1 = get_app("module1.app1") + app_by_module_name_1 = get_app("module1.app1") # request app by name and module app_by_module_name_2 = get_app("module2.app1") assert app_by_module_name_1("Hello") == "HELLO" assert app_by_module_name_2("Hello") == "hello" @@ -151,4 +151,5 @@ def dummy(val: int) -> int: apps = available_apps() assert isinstance(apps, Table) apps.filtered(lambda x: dummy.__name__ == x, columns='name') - assert apps.shape[0] == 1 \ No newline at end of file + assert apps.shape[0] == 1 +