Closed HEdingfield closed 8 years ago
This test is throwing an error again for me:
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 82, in test_licensed_extension
nt.assert_equal(arcpy.CheckExtension(self.known_available), u'Available')
File "C:\Python27\ArcGIS10.2\lib\unittest\case.py", line 511, in assertEqual
assertion_func(first, second, msg=msg)
File "C:\Python27\ArcGIS10.2\lib\unittest\case.py", line 922, in assertMultiLineEqual
self.fail(self._formatMessage(msg, standardMsg))
File "C:\Python27\ArcGIS10.2\lib\unittest\case.py", line 408, in fail
raise self.failureException(msg)
AssertionError: u'Unavailable' != u'Available'
And it causes 5 other tests to fail due to RuntimeError: spatial license isn't available
when running _polygons_to_raster_mixin.test_process
. Strangely, this wasn't occurring with yesterday's run. I did just check ArGIS Administrator though, and it says there are 0 of 2 licenses available, so maybe that's what's going on.
In any case, should these tests be smart enough to skip themselves if the license is found to be unavailable? It affects:
Note: Test_polygons_to_raster_x08 also fails on test_actual_arrays. I noticed that x02 and x16 both lack this function. Was that intentional, or an oversight?
In any case, should these tests be smart enough to skip themselves if the license is found to be unavailable?
Yeah -- can you add an @np.dec.skipif(arcpy.CheckExtension('Spatial') == u'Unavilable')
(or something like that) to them?
Test_polygons_to_raster_x08 also fails on test_actual_arrays. I noticed that x02 and x16 both lack this function. Was that intentional, or an oversight?
It was intentional, b/c that's all I had known results for. If you want to create known values for the other tests and add them to the test suite, that'd be :+1:
Above PR #45 adds the skips and fixes another error that was popping up as a result of mishandled kwargs. Unfortunately I don't have a good understanding of how to add the other test_actual_arrays rasters, so I'll leave this issue open in case you want to address that at some point.
Particularly of note is that I verified the error I mentioned here is indeed a result of me not having a Spatial License available to check out at the time. I verified this through ArcGIS Administrator, like I said, and I was actually able to snag one for a few minutes and this test didn't complain in the same way anymore (however it did result in #44).
sounds like this is fixed
This could be due to setup on my end but, if so, it might be good to design this test to be a bit more flexible?