Skip to content

Commit

Permalink
Add rule-based and categorized styles to the bad layers test
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 6, 2018
1 parent c8b2677 commit ba3ccca
Show file tree
Hide file tree
Showing 3 changed files with 305 additions and 158 deletions.
4 changes: 1 addition & 3 deletions tests/src/python/test_qgsprojectbadlayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ def testStyles(self):
options = QgsDataProvider.ProviderOptions()
temp_dir = QTemporaryDir()
p = QgsProject.instance()
project_path = os.path.join(temp_dir.path(), 'good_layers_test.qgs')
copyfile(os.path.join(TEST_DATA_DIR, 'projects', 'good_layers_test.qgs'), project_path)
copyfile(os.path.join(TEST_DATA_DIR, 'projects', 'bad_layers_test.gpkg'), os.path.join(temp_dir.path(), 'bad_layers_test.gpkg'))
for f in (
'bad_layer_raster_test.tfw',
'bad_layer_raster_test.tiff',
Expand All @@ -244,6 +241,7 @@ def testStyles(self):
'good_layers_test.qgs'):
copyfile(os.path.join(TEST_DATA_DIR, 'projects', f), os.path.join(temp_dir.path(), f))

project_path = os.path.join(temp_dir.path(), 'good_layers_test.qgs')
p = QgsProject().instance()
self.assertTrue(p.read(project_path))
self.assertEqual(p.count(), 3)
Expand Down
Binary file modified tests/testdata/projects/bad_layers_test.gpkg
Binary file not shown.
Loading

0 comments on commit ba3ccca

Please sign in to comment.