Exemple #1
0
 def test_get_port_range_invalid_syntax(self):
     self.flags(port_range='10:20:30', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #2
0
 def test_get_port_range_bad_range(self):
     self.flags(port_range='40000:30000', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #3
0
 def test_get_port_range_not_numeric(self):
     self.flags(port_range='xxx:yyy', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #4
0
 def test_get_port_range(self):
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #5
0
 def test_get_port_range_customized(self):
     self.flags(port_range='30000:40000', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(30000, start)
     self.assertEqual(40000, stop)
Exemple #6
0
 def test_get_port_range_invalid_syntax(self):
     self.flags(port_range='10:20:30', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #7
0
 def test_get_port_range_not_numeric(self):
     self.flags(port_range='xxx:yyy', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #8
0
 def test_get_port_range_bad_range(self):
     self.flags(port_range='40000:30000', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
Exemple #9
0
 def test_get_port_range_customized(self):
     self.flags(port_range='30000:40000', group='serial_console')
     start, stop = serial._get_port_range()
     self.assertEqual(30000, start)
     self.assertEqual(40000, stop)
Exemple #10
0
 def test_get_port_range(self):
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)