emmental/tests/util/__init__.py
Anna Schumaker 35d0d815ca audio: Load a track requested by the user
Either through the command line, mpris2, or the open button in the
header.

Implements: #7 (Add MPRIS2 Support)
Implements: #47 (Signal that the track has changed when it actually changes)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2023-04-12 10:41:58 -04:00

28 lines
644 B
Python

# Copyright 2022 (c) Anna Schumaker
"""Helper utilities for testing."""
import pathlib
import unittest
import emmental.db
from gi.repository import GObject
TRACK_OGG = pathlib.Path(__file__).parent / "track.ogg"
class TestCase(unittest.TestCase):
"""A TestCase that handles database setup and cleanup."""
def setUp(self):
"""Set up a database connection."""
self.sql = emmental.db.Connection()
def tearDown(self):
"""Clean up the database connection."""
self.sql.close()
class FloatObject(GObject.GObject):
"""A GObject holding a Float value."""
value = GObject.Property(type=float)