Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(11)  |  Derive(0)  |  Import(1)

src/p/y/pyptpchdk-0.2.1/tests/test_module.py   pyptpchdk(Download)
    def test_list_devices__arguments(self):
        # ptp.list_devices can be called without arguments.
        ptp.list_devices()
        # Or with one argument.
        ptp.list_devices(1)
        # Or one keyword argument.
        ptp.list_devices(force=0)
        # But not with the wrong parameter name.
        with self.assertRaises(TypeError):
            ptp.list_devices(foo=1)
        # Or with two parameters.
        with self.assertRaises(TypeError):
            ptp.list_devices(1, 2)
 
    def test_list_devices__default_result(self):

src/p/y/pyptpchdk-0.2.1/tests/test_ptp_device_property.py   pyptpchdk(Download)
    def test_properties(self):
        all_cameras = ptp.list_devices()
        for bus_no, device_no, vendor_id, product_id, name in all_cameras:
            device = ptp.PTPDevice(bus_no, device_no)
            expected = connected_cameras[(bus_no, device_no)]

src/p/y/pyptpchdk-0.2.1/tests/test_ptp_device_operations.py   pyptpchdk(Download)
    def test_operations(self):
        all_cameras = ptp.list_devices()
        for bus_no, device_no, vendor_id, product_id, name in all_cameras:
            self.addDetail(
                'camera', text_content(u'%03i:%03i' % (bus_no, device_no)))

src/p/y/pyptpchdk-0.2.1/tests/test_ptpdevice.py   pyptpchdk(Download)
    def test_createPTPDevice__with_params(self):
        all_cameras = ptp.list_devices()
        for bus_no, device_no, vendor_id, product_id, name in all_cameras:
            device = ptp.PTPDevice(bus_no, device_no)
            expected = connected_cameras[(bus_no, device_no)]

src/p/y/pyptpchdk-0.2.1/tests/test_devicecontroller.py   pyptpchdk(Download)
    StuckMessage,
    )
from ptp import (
    CHDKScriptStatus,
    list_devices,
            for x in range(12):
                sleep(1)
                devices = list_devices()
                if self.device_info not in devices:
                    self.fail('Camera powered off after setZoom()')
 
module = sys.modules[__name__]
all_devices = list_devices()
if not all_devices:
    print >>sys.stderr, "No devices found"