Geosyntec / python-tidegates

🌊 ArcToolbox to analyze flooding due to storm surges and climate change
http://geosyntec.github.io/python-tidegates/
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Test_polygons_to_raster_* error #44

Closed HEdingfield closed 8 years ago

HEdingfield commented 8 years ago

I was able to snag a checked-out spatial analyst license so these tests could run:

but they resulted in the following AssertionError for Test_polygons_to_raster_x02:

Failure
Traceback (most recent call last):
  File "C:\Python27\ArcGIS10.2\lib\unittest\case.py", line 327, in run
    testMethod()
  File "C:\Python27\ArcGIS10.2\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "H:\Dev\PyCharm Projects\python-tidegates\tidegates\tests\test_utils.py", line 412, in test_process
    nptest.assert_array_almost_equal(bins[bins > 0], self.known_counts)
  File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\testing\utils.py", line 886, in assert_array_almost_equal
    precision=decimal)
  File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\testing\utils.py", line 708, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

(mismatch 100.0%)
 x: array([95274, 36674])
 y: array([381211, 146710])

Same for Test_polygons_to_raster_x08, but different numbers:

 (mismatch 100.0%)
 x: array([95274, 36674])
 y: array([23828,  9172])

Same for Test_polygons_to_raster_x16, but different numbers:

 (mismatch 100.0%)
 x: array([95274, 36674])
 y: array([5953, 2288])
HEdingfield commented 8 years ago

This is resolved with PR #45, feel free to close when it's merged.