Skip to content

Could use some help - how do I run the tests? #10

@davidalpert

Description

@davidalpert

Perhaps this is my lack of experience with Python in general, but I would appreciate some guidance on how to run the tests.

I created a wiki page to document this before I realized that I did not yet know how that works.

Looking around I found this technique which led me to use this:

  • py -3.4 -m unittest discover tests

First run from the v4 tag gave me 5 failures, some of which indicated that I need the approvaltests module.

I ran py -3.4 -m pip install approvaltests successfully, then tried running the tests again:

$ py -3.4 -m unittest discover tests
EEEEE
======================================================================
ERROR: Infrastructure.CountdownManager.TestsCountdownManager (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\case.py", line 58, in testPartExecutor
    yield
  File "C:\Python34\lib\unittest\case.py", line 580, in run
    testMethod()
  File "C:\Python34\lib\unittest\loader.py", line 33, in testFailure
    raise self._exception
ImportError: Failed to import test module: Infrastructure.CountdownManager.TestsCountdownManager
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\loader.py", line 323, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python34\lib\unittest\loader.py", line 301, in _get_module_from_name
    __import__(name)
  File "C:\Users\dalpert\dev\mobtimer.python\tests\Infrastructure\CountdownManager\TestsCountdownManager.py", line 8, in <module>
    from Infrastructure.CountdownManager import CountdownManager
ImportError: cannot import name 'CountdownManager'


======================================================================
ERROR: Infrastructure.MobberManager.TestsMobberManager (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\case.py", line 58, in testPartExecutor
    yield
  File "C:\Python34\lib\unittest\case.py", line 580, in run
    testMethod()
  File "C:\Python34\lib\unittest\loader.py", line 33, in testFailure
    raise self._exception
ImportError: Failed to import test module: Infrastructure.MobberManager.TestsMobberManager
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\loader.py", line 323, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python34\lib\unittest\loader.py", line 301, in _get_module_from_name
    __import__(name)
  File "C:\Users\dalpert\dev\mobtimer.python\tests\Infrastructure\MobberManager\TestsMobberManager.py", line 6, in <module>
    from Infrastructure.MobberManager import MobberManager
ImportError: cannot import name 'MobberManager'


======================================================================
ERROR: Infrastructure.SessionManager.TestsSessionManager (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\case.py", line 58, in testPartExecutor
    yield
  File "C:\Python34\lib\unittest\case.py", line 580, in run
    testMethod()
  File "C:\Python34\lib\unittest\loader.py", line 33, in testFailure
    raise self._exception
ImportError: Failed to import test module: Infrastructure.SessionManager.TestsSessionManager
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\loader.py", line 323, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python34\lib\unittest\loader.py", line 301, in _get_module_from_name
    __import__(name)
  File "C:\Users\dalpert\dev\mobtimer.python\tests\Infrastructure\SessionManager\TestsSessionManager.py", line 4, in <module>
    from Infrastructure.SessionManager import SessionManager
ImportError: cannot import name 'SessionManager'


======================================================================
ERROR: Infrastructure.TimeOptionsManager.TestsTimeOptionsManager (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\case.py", line 58, in testPartExecutor
    yield
  File "C:\Python34\lib\unittest\case.py", line 580, in run
    testMethod()
  File "C:\Python34\lib\unittest\loader.py", line 33, in testFailure
    raise self._exception
ImportError: Failed to import test module: Infrastructure.TimeOptionsManager.TestsTimeOptionsManager
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\loader.py", line 323, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python34\lib\unittest\loader.py", line 301, in _get_module_from_name
    __import__(name)
  File "C:\Users\dalpert\dev\mobtimer.python\tests\Infrastructure\TimeOptionsManager\TestsTimeOptionsManager.py", line 7, in <module>
    from Infrastructure.TimeSettingsManager import TimeSettingsManager
ImportError: No module named 'Infrastructure.TimeSettingsManager'


======================================================================
ERROR: Infrastructure.TipsManager.TestTipsManager (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\case.py", line 58, in testPartExecutor
    yield
  File "C:\Python34\lib\unittest\case.py", line 580, in run
    testMethod()
  File "C:\Python34\lib\unittest\loader.py", line 33, in testFailure
    raise self._exception
ImportError: Failed to import test module: Infrastructure.TipsManager.TestTipsManager
Traceback (most recent call last):
  File "C:\Python34\lib\unittest\loader.py", line 323, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python34\lib\unittest\loader.py", line 301, in _get_module_from_name
    __import__(name)
  File "C:\Users\dalpert\dev\mobtimer.python\tests\Infrastructure\TipsManager\TestTipsManager.py", line 5, in <module>
    from Infrastructure.TipsManager import TipsManager
ImportError: cannot import name 'TipsManager'


----------------------------------------------------------------------
Ran 5 tests in 0.005s

FAILED (errors=5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions