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_cleanup_temp_results failing #36

Closed HEdingfield closed 8 years ago

HEdingfield commented 8 years ago

This test fails for me unless I put a break on the assert_false line. If I do that, it pauses, then I resume the code and it passes. This makes me think that the utils.cleanup_temp_results function takes a bit of time to fully delete the directories and the assertion is occuring before they're fully deleted. I tried commenting out that line and replacing it directly with:

arcpy.management.Delete(raster1)
arcpy.management.Delete(raster2)

But the same problem occurred. Traceback below:

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 606, in test_cleanup_temp_results
    nt.assert_false(os.path.exists("temp_2"))
  File "C:\Python27\ArcGIS10.2\lib\unittest\case.py", line 414, in assertFalse
    raise self.failureException(msg)
AssertionError: True is not false
phobson commented 8 years ago

Hey @HEdingfield see if #39. #40, or #41 fixed this for you

HEdingfield commented 8 years ago

Resolved with latest upstream version..