def test_write(): # Copy test data tmp_folder = copy_to_tmp('tests/data') gpkg_path = os.path.join(tmp_folder, 'small_world.gpkg') qgs_path = os.path.join(tmp_folder, 'small_world.qgs') gpkg = QGpkg(gpkg_path, nolog) gpkg.write(qgs_path) gpkg.info() output = sys.stdout.getvalue().strip() info = """gpkg_contents features: ne_110m_admin_0_countries gpkg_contents tiles: small_world GPKG extensions: qgis gpkg_rtree_index QGIS projects: small_world.qgs QGIS recources: qgis.png""" assert output == info
def write(args): gpkg = QGpkg(args.gpkg, log) gpkg.write(args.qgs) return 0