Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_unlicensed_extension failure on my end #18

Closed
HEdingfield opened this issue Oct 30, 2015 · 4 comments
Closed

test_unlicensed_extension failure on my end #18

HEdingfield opened this issue Oct 30, 2015 · 4 comments
Labels
Milestone

Comments

@HEdingfield
Copy link
Contributor

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?

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 "C:\Python27\ArcGIS10.2\lib\site-packages\nose\tools\nontrivial.py", line 67, in newfunc
    raise AssertionError(message)
AssertionError: test_unlicensed_extension() did not raise RuntimeError
@HEdingfield
Copy link
Contributor Author

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:

  • Test_polygons_to_raster_default
  • Test_polygons_to_raster_x02
  • Test_polygons_to_raster_x08
  • Test_polygons_to_raster_x16

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?

@HEdingfield HEdingfield reopened this Nov 17, 2015
@phobson
Copy link
Contributor

phobson commented Nov 17, 2015

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 👍

@HEdingfield
Copy link
Contributor Author

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).

@phobson
Copy link
Contributor

phobson commented Nov 19, 2015

sounds like this is fixed

@phobson phobson closed this as completed Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants