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

New tests and bug fixes #15

Merged
merged 10 commits into from
Feb 20, 2015
Merged

Conversation

jiffyclub
Copy link
Contributor

I did a bit of work when going through the exercise of incorporating OMX into ActivitySim (ActivitySim/activitysim#7) and thought they might be appreciated here. The largest changes are increased test coverage and bug fixes.

  • Use temporary files and nosetests fixtures so that test files aren't left around in the working directory after running the unit tests
  • Several new tests covering previously untested parts of File
  • Fixed a bug in File.listAllAttributes that caused it to always return []
  • Use is/is not for comparisons to None so we don't get a warning from tables

The existing test was adding a matrix of an incompatible shape,
which doesn't test the intended code path.
Uses a setup fixture that generates a test file name using
the tempfile module and a teardown fixture that
deletes the file after each test is complete.
This ensures that all the files are properly closed
when the tests are done with them.
To eliminate the from nose.tools import *
These tend to give more useful error messages than plain asserts.
Need to search self.root.data, not self.root, for nodes.
Stops this warning from appearing when using openmatrix:
File.py:30: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
billyc added a commit that referenced this pull request Feb 20, 2015
@billyc billyc merged commit fa0b265 into osPlanning:dev Feb 20, 2015
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.

2 participants