aider: Fixed relative import error in test_git.py.
# Context:
USER: I ran this command:
python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py
And got this output:
Traceback (most recent call last):
File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 3, in <module>
from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.EternalKernelLiteGraphNodes'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 5, in <module>
from ..git import CreateRepoNode
ImportError: attempted relative import with no known parent package
This commit is contained in:
+1
-7
@@ -1,10 +1,5 @@
|
||||
import unittest
|
||||
try:
|
||||
from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRepoNode
|
||||
except:
|
||||
from ..git import CreateRepoNode
|
||||
|
||||
|
||||
from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRepoNode
|
||||
|
||||
class TestCreateRepoNode(unittest.TestCase):
|
||||
def test_create_repo(self):
|
||||
@@ -12,6 +7,5 @@ class TestCreateRepoNode(unittest.TestCase):
|
||||
node.create_repo(subdirectory="my_repo")
|
||||
# Add assertions or additional test logic here
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user