test_resources.py 1010 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__ = 'vrobel.jan@seznam.cz'
  9. __date__ = '2019-02-15'
  10. __copyright__ = 'Copyright 2019, jan vrobel'
  11. import unittest
  12. from PyQt5.QtGui import QIcon
  13. class AtlasDialogTest(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/Atlas/icon.png'
  24. icon = QIcon(path)
  25. self.assertFalse(icon.isNull())
  26. if __name__ == "__main__":
  27. suite = unittest.makeSuite(AtlasResourcesTest)
  28. runner = unittest.TextTestRunner(verbosity=2)
  29. runner.run(suite)