Exemplo n.º 1
0
 def setUp(self):
     rawapi.sane_init()
     devices = rawapi.sane_get_devices()
     self.assertTrue(len(devices) > 0)
     dev_name = devices[0].name
     self.dev_handle = rawapi.sane_open(dev_name)
     self.nb_options = rawapi.sane_get_option_value(self.dev_handle, 0)
Exemplo n.º 2
0
 def setUp(self):
     rawapi.sane_init()
     devices = get_test_devices()
     self.assertTrue(len(devices) > 0)
     dev_name = devices[0].name
     self.dev_handle = rawapi.sane_open(dev_name)
     self.nb_options = rawapi.sane_get_option_value(self.dev_handle, 0)
Exemplo n.º 3
0
def sane_init():
    global sane_is_init
    global sane_version
    if sane_is_init <= 0:
        sane_version = rawapi.sane_init()
    sane_is_init += 1
    return sane_version
Exemplo n.º 4
0
 def setUp(self):
     rawapi.sane_init()
     devices = rawapi.sane_get_devices()
     self.assertTrue(len(devices) > 0)
     self.dev_name = devices[0].name
Exemplo n.º 5
0
 def setUp(self):
     rawapi.sane_init()
Exemplo n.º 6
0
 def test_init(self):
     version = rawapi.sane_init()
     self.assertTrue(version.is_current())
     rawapi.sane_exit()
Exemplo n.º 7
0
 def setUp(self):
     rawapi.sane_init()
     devices = get_test_devices()
     self.assertTrue(len(devices) > 0)
     dev_name = devices[0].name
     self.dev_handle = rawapi.sane_open(dev_name)
Exemplo n.º 8
0
 def setUp(self):
     rawapi.sane_init()
     devices = get_test_devices()
     self.assertTrue(len(devices) > 0)
     self.dev_name = devices[0].name
Exemplo n.º 9
0
 def setUp(self):
     rawapi.sane_init()
Exemplo n.º 10
0
 def test_init(self):
     version = rawapi.sane_init()
     self.assertTrue(version.is_current())
     rawapi.sane_exit()