summaryrefslogtreecommitdiff
path: root/tests/test_ref.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ref.py')
-rw-r--r--tests/test_ref.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_ref.py b/tests/test_ref.py
index 5024971..c9fd93d 100644
--- a/tests/test_ref.py
+++ b/tests/test_ref.py
@@ -19,5 +19,10 @@ class TestReference(unittest.TestCase):
self.assertLess(((m[name] - want).norm() / want.norm()).item(), 1e-12, name)
+class TestDeviceSelection(unittest.TestCase):
+ def test_missing_device_is_a_skip_reason_not_an_error(self):
+ self.assertIsInstance(usable(torch.device("cuda:99")), str)
+
+
if __name__ == "__main__":
unittest.main()