Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 19, 2020
1 parent db4b215 commit 1befc32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/src/python/test_qgslocalizeddatapathregistry.py
Expand Up @@ -45,16 +45,16 @@ def tearDown(self):
QgsApplication.localizedDataPathRegistry().unregisterPath(BASE_PATH)

def testQgsLocalizedDataPathRegistry(self):
self.assertEqual(QgsApplication.localizedDataPathRegistry().relativePath(ABSOLUTE_PATH), MAP_PATH)
self.assertEqual(QgsApplication.localizedDataPathRegistry().fullPath(MAP_PATH), ABSOLUTE_PATH)
self.assertEqual(QgsApplication.localizedDataPathRegistry().localizedPath(ABSOLUTE_PATH), MAP_PATH)
self.assertEqual(QgsApplication.localizedDataPathRegistry().globalPath(MAP_PATH), ABSOLUTE_PATH)

def testOrderOfPreference(self):
temp_dir = gettempdir()
os.mkdir('{}/data'.format(temp_dir))
alt_dir = '{}/{}'.format(temp_dir, MAP_PATH)
Path(alt_dir).touch()
QgsApplication.localizedDataPathRegistry().registerPath(temp_dir, 0)
self.assertEqual(QgsApplication.localizedDataPathRegistry().fullPath(MAP_PATH), alt_dir)
self.assertEqual(QgsApplication.localizedDataPathRegistry().globalPath(MAP_PATH), alt_dir)
QgsApplication.localizedDataPathRegistry().unregisterPath(temp_dir)

def testWithResolver(self):
Expand Down

0 comments on commit 1befc32

Please sign in to comment.