-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.1.1 fix roundoff bug in time, update docs
- Loading branch information
Kendrick.Shaw
authored and
Kendrick.Shaw
committed
Jul 21, 2009
1 parent
96284bd
commit 9acfc64
Showing
3 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,13 +147,29 @@ def testreadwrite(self): | |
|
||
|
||
|
||
class TestRegressions(unittest.TestCase): | ||
"""Tests for bugs that were found in previous releases""" | ||
|
||
# bugs fixed in 0.1.1 | ||
def test_linearsequencelength(self): | ||
""" Off-by-one error in len(np.asarray(a_linearsequence)) | ||
Found by: Dr. Hillel Chiel ([email protected]) | ||
""" | ||
seq = axographio.linearsequence(1000, 0., 0.036) | ||
seqAsArray = np.asarray(seq) | ||
self.assertEqual(len(seq), 1000) | ||
self.assertEqual(len(seqAsArray), 1000) | ||
|
||
|
||
|
||
def test_all(): | ||
"""Returns a test suite with all of the tests for axographio""" | ||
suite = unittest.TestSuite() | ||
fix_module_doctest(axographio) | ||
suite.addTest(doctest.DocTestSuite(axographio)) | ||
suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSampleFiles)) | ||
suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestReadWrite)) | ||
suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestRegressions)) | ||
return suite | ||
|
||
# | ||
|
@@ -192,5 +208,6 @@ def fix_module_doctest(module): | |
and _from_module(module, value)): | ||
module.__test__[name] = value.__doc__ | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
unittest.TextTestRunner(verbosity=2).run(test_all()) |