Skip to content

Commit

Permalink
a couple of extra tests for GPULookupError
Browse files Browse the repository at this point in the history
  • Loading branch information
opalmer committed Sep 24, 2015
1 parent 8e94e97 commit 857c888
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_agent/test_sysinfo.py
Expand Up @@ -482,3 +482,15 @@ def testUnknownPlatform(self):
):
with self.assertRaises(graphics.GPULookupError):
graphics.graphics_cards()

def test_gpu_lookup_error_parent_exception(self):
error = graphics.GPULookupError("foo")
self.assertIsInstance(error, Exception)

def test_gpu_lookup_error_repr(self):
error = graphics.GPULookupError("foo")
self.assertEqual(repr(error.value), str(error))

def test_gpu_lookup_error_value(self):
error = graphics.GPULookupError("foo")
self.assertEqual(error.value, "foo")

0 comments on commit 857c888

Please sign in to comment.