Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unittest fix/workaround - remove CPU options and disable control_server #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brpollock
Copy link

There were two problems with test.py:

1, No options argument passed to CPU.__init__()

  • CPU options were only used to pass 'pc'. Rather than adding another
    get_options/Options to tests,py, replacing options with a pc argument
    removes CPU's dependency on command-line options.
  1. Failed to init control_server due to Address already in use
  • As a workaround for 'Address already in use', control_server is now
    enabled/disabled by memory.use_bus (which is False in unit tests).

With these changes, all 59 tests pass:

...........................................................
----------------------------------------------------------------------
Ran 59 tests in 0.336s

OK

- CPU options were only used to pass 'pc'. Rather than adding another
  get_options/Options to tests,py, replacing options with a pc argument
  removes CPU's dependency on command-line options.

- As a workaround for 'Address already in use', control_server is now
  enabled/disabled by memory.use_bus (which is False in unit tests).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant