mikeizbicki / cmc-csci046

CMC's Data Structures and Algorithms Course Materials
55 stars 155 forks source link

Error collecting BST.py #534

Closed NACB closed 1 year ago

NACB commented 1 year ago

Hi Mike,

As I work to get caught back up, I've come up against an error I can't crack. When I try to run the test cases for BST.py, I get the following error:

_______________________________________ ERROR collecting BST.py ________________________________________
ImportError while importing test module '/home/nbaumann24/proj/oop/containers/BST.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.6/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
BST.py:7: in <module>
    from containers.BinaryTree import BinaryTree, Node
E   ModuleNotFoundError: No module named 'containers.BinaryTree'; 'containers' is not a package

What is going on here?

p.s: should be back on track soon

mikeizbicki commented 1 year ago

I've fixed the error for you by adding a file containers/__init__.py inside your oop repo on the lambda server. You can now run

lambda-server:~ $ cd proj/oop/
lambda-server:~/proj/oop (bst %) $ python3 -m pytest
NACB commented 1 year ago

Thanks Mike! I'll try it out after work and close the issue if things are working as they should be.