Skip to content
Permalink
Browse files

fix test

  • Loading branch information
3nids committed May 19, 2020
1 parent db4b215 commit 1befc328fd13511a4e34bec117069905fffac4ba
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/src/python/test_qgslocalizeddatapathregistry.py
@@ -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):

0 comments on commit 1befc32

Please sign in to comment.
You can’t perform that action at this time.