def test_serial_dev_file(self): # Use: /dev/ttyS0 devname = DevMapper.serial(self.devname) self.assertEqual(self.devname, devname)
def test_serial_invalid_path(self): try: devname = DevMapper.serial('/sys/devices/my/device/path') except DevMapperError: pass
def test_serial_ttyS0_case_2(self): # Use: /sys/devices/pnp0/00:08/tty/ devname = DevMapper.serial(self.devpath + '/') self.assertEqual(self.devname, devname)