You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
======================================================================
FAIL: itemset (fipy.tools.dimensions.physicalField.PhysicalField)
Doctest: fipy.tools.dimensions.physicalField.PhysicalField.itemset
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.tools.dimensions.physicalField.PhysicalField.itemset
File "fipy/tools/dimensions/physicalField.py", line 577, in itemset
----------------------------------------------------------------------
File "fipy/tools/dimensions/physicalField.py", line 587, in fipy.tools.dimensions.physicalField.PhysicalField.itemset
Failed example:
a.itemset(PhysicalField("6 ft"))
Expected:
Traceback (most recent call last):
...
ValueError: can only place a scalar for an array of size 1
Got:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1289, in __run
compileflags, 1) in test.globs
File "<doctest fipy.tools.dimensions.physicalField.PhysicalField.itemset[4]>", line 1, in <module>
a.itemset(PhysicalField("6 ft"))
File "fipy/tools/dimensions/physicalField.py", line 600, in itemset
self.value.itemset(value)
IndexError: index 3746994889972252674 is out of bounds for axis 0 with size 2
May just need to relax the failure requirement.
Imported from trac ticket #638, created by wd15 on 04-17-2013 at 11:05, last modified: 09-11-2013 at 17:03
The text was updated successfully, but these errors were encountered:
#CommitTicketReference repository="fipy" revision="51a5edaed54c436d5f68ec9b936ba034899098a1"
Hack a fix for two possible different exceptions
Effectively convert the `IndexError` to a `ValueError`.
Is there a better way to catch different exceptions with doctest?
Addresses issue #381
Trac comment by Jonathan Guyer guyer@nist.gov on 09-05-2013 at 22:08
The following changes since commit 44bc4c5eee559d10c0811536ebd8a3c23f72364b:
Merge branch 'develop' into ticket460-import-fipy-without-solvers-rebase (2013-09-05 16:35:41 -0400)
are available in the git repository at:
ssh://git@code.matforge.org/nist/fipy.git ticket638-numpy_1_7_1_test_failures_with_physicalField_py
for you to fetch changes up to 51a5edaed54c436d5f68ec9b936ba034899098a1:
Hack a fix for two possible different exceptions (2013-09-05 21:57:43 -0400)
----------------------------------------------------------------
Jonathan Guyer (1):
Hack a fix for two possible different exceptions
fipy/tools/dimensions/physicalField.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Raymond Smith (see http://thread.gmane.org/gmane.comp.python.fipy/3024) noticed some failures with numpy 1.7.1. There is still the error associated with issue #375 and now this new issue.
May just need to relax the failure requirement.
Imported from trac ticket #638, created by wd15 on 04-17-2013 at 11:05, last modified: 09-11-2013 at 17:03
The text was updated successfully, but these errors were encountered: