コード例 #1
0
 def test_get_serial_number_overflows(self):
     driver = UnipiDALIDriver()
     driver._next_sn = 255
     self.assertEqual(driver._get_sn(), 1)
コード例 #2
0
 def test_get_serial_number(self):
     driver = UnipiDALIDriver()
     driver._next_sn = 1
     self.assertEqual(driver._get_sn(), 2)
コード例 #3
0
 def test_get_serial_number_random(self):
     driver = UnipiDALIDriver()
     driver._next_sn = 5
     self.assertEqual(driver._get_sn(), 6)
コード例 #4
0
 def test_get_serial_number_init(self):
     driver = UnipiDALIDriver()
     self.assertEqual(driver._get_sn(), 1)