test_resources.py 1003 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # coding=utf-8
  2. """Resources test.
  3. .. note:: This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. """
  8. __author__ = 'admin@siwei.com'
  9. __date__ = '2024-09-03'
  10. __copyright__ = 'Copyright 2024, siwei'
  11. import unittest
  12. from qgis.PyQt.QtGui import QIcon
  13. class FTPDialogTest(unittest.TestCase):
  14. """Test rerources work."""
  15. def setUp(self):
  16. """Runs before each test."""
  17. pass
  18. def tearDown(self):
  19. """Runs after each test."""
  20. pass
  21. def test_icon_png(self):
  22. """Test we can click OK."""
  23. path = ':/plugins/Resource/icon.png'
  24. icon = QIcon(path)
  25. self.assertFalse(icon.isNull())
  26. if __name__ == "__main__":
  27. suite = unittest.makeSuite(FTPResourcesTest)
  28. runner = unittest.TextTestRunner(verbosity=2)
  29. runner.run(suite)