Exemple #1
0
 def test_parses_no_host_returns_empty_list(self):
     host = ''
     self.assertEqual(('',[]), util.parse_host(host))
Exemple #2
0
 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))
Exemple #3
0
 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))
Exemple #4
0
 def test_parses_host_no_cpu(self):
     host = 'host.example.com'
     self.assertEqual(('host.example.com',[]), util.parse_host(host))
Exemple #5
0
 def test_parses_single_cpu(self):
     host = 'host.example.com/2'
     self.assertEqual(('host.example.com',[2]), util.parse_host(host))
Exemple #6
0
 def test_parses_no_host_returns_empty_list(self):
     host = ''
     self.assertEqual(('', []), util.parse_host(host))
Exemple #7
0
 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))
Exemple #8
0
 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))
Exemple #9
0
 def test_parses_single_cpu(self):
     host = 'host.example.com/2'
     self.assertEqual(('host.example.com', [2]), util.parse_host(host))
Exemple #10
0
 def test_parses_host_no_cpu(self):
     host = 'host.example.com'
     self.assertEqual(('host.example.com', []), util.parse_host(host))