From 6f72a1a258dd48d39c9c6822942325320948067c Mon Sep 17 00:00:00 2001 From: Humorous Baby Date: Sat, 30 Mar 2019 11:41:49 -0400 Subject: [PATCH 1/2] fix: regression in testing individual modules Using `sopel.tools.target...` in `sopel/test_tools.py` an error because `sopel.tools` does not seem to be aware of `target`. I expect this is because `target.py` requires a class from `sopel.tools` and this would leads to circular imports. Need to `import sopel.tools.target` separately to avoid this. `pytest` tests work fine because it knows of `sopel.tools.target` by that name already from traversing the `rootdir`. --- sopel/test_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sopel/test_tools.py b/sopel/test_tools.py index 72e2420eb5..c735ca5f75 100644 --- a/sopel/test_tools.py +++ b/sopel/test_tools.py @@ -22,6 +22,7 @@ import sopel.config import sopel.config.core_section import sopel.tools +import sopel.tools.target import sopel.trigger From 31e0c587a10368579dee340143c161a161b850dd Mon Sep 17 00:00:00 2001 From: Humorous Baby Date: Sat, 30 Mar 2019 12:02:34 -0400 Subject: [PATCH 2/2] fix: `AttributeError` in ipython module test See https://github.com/sopel-irc/sopel/pull/1529#issuecomment-478259388 --- sopel/modules/ipython.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sopel/modules/ipython.py b/sopel/modules/ipython.py index a2cecce849..27626ede5f 100644 --- a/sopel/modules/ipython.py +++ b/sopel/modules/ipython.py @@ -9,6 +9,7 @@ from __future__ import unicode_literals, absolute_import, print_function, division import sopel +import sopel.module import sys if sys.version_info.major >= 3: # Backup stderr/stdout wrappers