emmental/audio/test_artwork.py
Anna Schumaker 029b432dd3 audio: Check that artwork has a default path
Instead of checking the path itself. I found that the test fails if
Emmental is installed, since it's finding the artwork in
/usr/share/icons before our local path.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-31 13:15:49 -04:00

28 lines
938 B
Python

# Copyright 2021 (c) Anna Schumaker.
from . import artwork
from gi.repository import Gtk
import pathlib
import unittest
Path = pathlib.Path("./data/hicolor/scalable/apps/emmental.svg")
class TestAudioArtwork(unittest.TestCase):
def test_audio_artwork_init(self):
art = artwork.Artwork()
self.assertIsInstance(art, Gtk.AspectFrame)
self.assertIsInstance(art.frame, Gtk.Frame)
self.assertIsInstance(art.picture, Gtk.Picture)
self.assertEqual(art.get_child(), art.frame)
self.assertEqual(art.frame.get_child(), art.picture)
self.assertEqual(art.get_obey_child(), False)
self.assertEqual(art.get_ratio(), 1.0)
self.assertEqual(art.get_margin_start(), 5)
self.assertEqual(art.get_margin_end(), 5)
self.assertEqual(art.get_margin_top(), 5)
self.assertEqual(art.get_margin_bottom(), 5)
self.assertIsNotNone(art.get_default_path())