Skip to content

Some errors when run "python -m pytest" #184

@Aaricis

Description

@Aaricis

=========================================== test session starts ===========================================
platform linux -- Python 3.6.7, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
rootdir: /home/zkg/sequential_social_dilemma_games
collected 0 items / 2 errors                                                                              

================================================= ERRORS ==================================================
___________________________________ ERROR collecting tests/test_envs.py ___________________________________
ImportError while importing test module '/home/zkg/sequential_social_dilemma_games/tests/test_envs.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/root/anaconda3/envs/causal/lib/python3.6/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test_envs.py:8: in <module>
    from social_dilemmas.envs.agent import Agent
E   ModuleNotFoundError: No module named 'social_dilemmas'
_________________________________ ERROR collecting tests/test_rollout.py __________________________________
ImportError while importing test module '/home/zkg/sequential_social_dilemma_games/tests/test_rollout.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/root/anaconda3/envs/causal/lib/python3.6/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test_rollout.py:4: in <module>
    from rollout import Controller
E   ModuleNotFoundError: No module named 'rollout'
========================================= short test summary info =========================================
ERROR test_envs.py
ERROR test_rollout.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!```

I have ` social_dilemmas` folder and `rollout.py`, but I do not know why they cannot be recognized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions