class_docstr: Tests for caliban.platform.cloud.types.
code: def test_gpuspec_parse_arg(self):
      with self.assertRaises(ArgumentTypeError):
          # invalid format string, no x separator.
          ct.GPUSpec.parse_arg("face")
  
      with self.assertRaises(ArgumentTypeError):
          # Invalid number.
          ct.GPUSpec.parse_arg("randomxV100")
  
      with self.assertRaises(ArgumentTypeError):
          # invalid GPU type.
          ct.GPUSpec.parse_arg("8xNONSTANDARD")
  
      with self.assertRaises(ArgumentTypeError):
          # Invalid number for the valid GPU type.
          ct.GPUSpec.parse_arg("15xV100")
  
      self.assertEqual(
          ct.GPUSpec(ct.GPU.V100, 7),
          ct.GPUSpec.parse_arg("7xV100", validate_count=False),
      )
  
      # Valid!
      self.assertEqual(
          ct.GPUSpec(ct.GPU.V100, 8), ct.GPUSpec.parse_arg("8xV100")
      )
  
file_path: caliban/tests/caliban/platform/cloud/test_types.py
imports: import unittest
  from argparse import ArgumentTypeError
  import hypothesis.strategies
  from hypothesis import given
  import caliban.platform.cloud.types
label_desc: Use image node_id 3 for calling the TypesTestSuite obj's underlying member method code with example usage: obj.test_gpuspec_parse_arg() without return types