From 0374d34937a1d288ed2a3406f59674757304a71c Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sun, 20 Oct 2024 12:09:16 +0700 Subject: [PATCH] Adjust test coverage --- tests/src/python/test_qgsfontmanager.py | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/src/python/test_qgsfontmanager.py b/tests/src/python/test_qgsfontmanager.py index 9305b485cfcb..dc1f610615eb 100644 --- a/tests/src/python/test_qgsfontmanager.py +++ b/tests/src/python/test_qgsfontmanager.py @@ -201,51 +201,51 @@ def test_font_download_urls(self): self.assertEqual(manager.detailsForFontDownload('Alegreya SC')[0].licenseUrl(), 'https://github.com/google/fonts/raw/main/ofl/alegreyasc/OFL.txt') self.assertEqual(manager.urlForFontDownload('Roboto'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Open Sans'), - ('https://github.com/google/fonts/raw/main/ofl/opensans/OpenSans[wdth,wght].ttf', 'Open Sans')) + ('https://github.com/google/fonts/raw/main/ofl/opensans/OpenSans%5Bwdth,wght%5D.ttf', 'Open Sans')) # not available via github? # self.assertEqual(manager.urlForFontDownload('Open Sans Condensed'), # ('https://fonts.google.com/download?family=Open+Sans+Condensed', 'Open Sans Condensed')) self.assertEqual(manager.urlForFontDownload('Noto Sans'), - ('https://github.com/google/fonts/raw/main/ofl/notosans/NotoSans[wdth,wght].ttf', 'Noto Sans')) + ('https://github.com/google/fonts/raw/main/ofl/notosans/NotoSans%5Bwdth,wght%5D.ttf', 'Noto Sans')) - self.assertEqual(manager.urlForFontDownload('Roboto Condensed'), ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed[wght].ttf', 'Roboto Condensed')) + self.assertEqual(manager.urlForFontDownload('Roboto Condensed'), ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed%5Bwght%5D.ttf', 'Roboto Condensed')) # variants for font names typically seen in vector tile styles - self.assertEqual(manager.urlForFontDownload('RobotoCondensedRegular'), ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed[wght].ttf', 'Roboto Condensed')) - self.assertEqual(manager.urlForFontDownload('Roboto Condensed Regular'), ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed[wght].ttf', 'Roboto Condensed')) + self.assertEqual(manager.urlForFontDownload('RobotoCondensedRegular'), ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed%5Bwght%5D.ttf', 'Roboto Condensed')) + self.assertEqual(manager.urlForFontDownload('Roboto Condensed Regular'), ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed%5Bwght%5D.ttf', 'Roboto Condensed')) self.assertEqual(manager.urlForFontDownload('Roboto_Condensed_Regular'), - ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed[wght].ttf', 'Roboto Condensed')) + ('https://github.com/google/fonts/raw/main/ofl/robotocondensed/RobotoCondensed%5Bwght%5D.ttf', 'Roboto Condensed')) # with style names self.assertEqual(manager.urlForFontDownload('Roboto Black'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Black Italic'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Bold'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Bold Italic'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Italic'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Light'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Light Italic'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Medium'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Medium Italic'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Regular'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Thin'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) self.assertEqual(manager.urlForFontDownload('Roboto Thin Italic'), - ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto[wdth,wght].ttf', 'Roboto')) + ('https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth,wght%5D.ttf', 'Roboto')) if __name__ == '__main__':