示例#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)
示例#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)
示例#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)
示例#4
0
 def test_get_port_range(self):
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#10
0
 def test_get_port_range(self):
     start, stop = serial._get_port_range()
     self.assertEqual(10000, start)
     self.assertEqual(20000, stop)