def test_load_from_vtreader_7_clip_python_decoded_tiles(self, mock_can_load, mock_critical, mock_info):
     global iface
     clear_cache()
     self._load(iface=iface, max_tiles=2, clip_tiles=True)
     print mock_info.call_args_list
     print mock_critical.call_args_list
     mock_info.assert_any_call('Native decoding not supported: {}, {}bit', 'linux2', '64')
     mock_info.assert_any_call("Import complete")
 def test_load_from_vtreader_5_clip_native_decoded_tiles(self, mock_critical, mock_info):
     global iface
     clear_cache()
     self._load(iface=iface, max_tiles=2, clip_tiles=True)
     print mock_info.call_args_list
     print mock_critical.call_args_list
     mock_info.assert_any_call("Native decoding supported!!!")
     mock_info.assert_any_call("Import complete")
 def test_load_from_vtreader_2(self, mock_info):
     global iface
     clear_cache()
     QgsMapLayerRegistry.instance().removeAllMapLayers()
     self._load(iface=iface, max_tiles=1)
     print mock_info.call_args_list
     mock_info.assert_any_call("Native decoding supported!!!")
     mock_info.assert_any_call("Decoding finished, {} tiles with data", 1)
     mock_info.assert_any_call("Import complete")
 def test_load_from_vtreader_0_apply_styles(self, mock_style, mock_critical, mock_info):
     global iface
     clear_cache()
     QgsMapLayerRegistry.instance().removeAllMapLayers()
     self._load(iface=iface, max_tiles=1, apply_styles=True)
     print mock_info.call_args_list
     print mock_critical.call_args_list
     # print mock_style.assert_called_with()
     mock_info.assert_any_call("Import complete")
    def test_load_from_vtreader_1_multiprocessed(self, mock_qgis, mock_info):
        global iface
        QgsMapLayerRegistry.instance().removeAllMapLayers()
        clear_cache()

        self._load(iface=iface, max_tiles=2, serial_tile_processing_limit=1)

        print mock_info.call_args_list
        mock_info.assert_any_call("Native decoding supported!!!")
        mock_info.assert_any_call("Decoding finished, {} tiles with data", 2)
        mock_info.assert_any_call("Import complete")
    def test_load_from_vtreader_0_python_processing(self, mock_qgis, mock_can_load_lib, mock_info):
        global iface
        QgsMapLayerRegistry.instance().removeAllMapLayers()
        clear_cache()

        self._load(iface=iface, max_tiles=1)

        print mock_info.call_args_list
        mock_info.assert_any_call('Native decoding not supported: {}, {}bit', 'linux2', '64')
        mock_info.assert_any_call("Decoding finished, {} tiles with data", 1)
        mock_info.assert_any_call("Import complete")