def test_parses_no_host_returns_empty_list(self): host = '' self.assertEqual(('',[]), util.parse_host(host))
def test_parses_range_single_cpu(self): host = 'host.example.com/0,2-4' self.assertEqual(('host.example.com',[0,2,3,4]), util.parse_host(host))
def test_parses_range_multi_cpu_list(self): host = 'host.example.com/0,2' self.assertEqual(('host.example.com',[0,2]), util.parse_host(host))
def test_parses_host_no_cpu(self): host = 'host.example.com' self.assertEqual(('host.example.com',[]), util.parse_host(host))
def test_parses_single_cpu(self): host = 'host.example.com/2' self.assertEqual(('host.example.com',[2]), util.parse_host(host))
def test_parses_no_host_returns_empty_list(self): host = '' self.assertEqual(('', []), util.parse_host(host))
def test_parses_range_multi_cpu_list(self): host = 'host.example.com/0,2' self.assertEqual(('host.example.com', [0, 2]), util.parse_host(host))
def test_parses_range_single_cpu(self): host = 'host.example.com/0,2-4' self.assertEqual(('host.example.com', [0, 2, 3, 4]), util.parse_host(host))
def test_parses_single_cpu(self): host = 'host.example.com/2' self.assertEqual(('host.example.com', [2]), util.parse_host(host))
def test_parses_host_no_cpu(self): host = 'host.example.com' self.assertEqual(('host.example.com', []), util.parse_host(host))