Anna Schumaker
35d0d815ca
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>
22 lines
626 B
Python
22 lines
626 B
Python
# Copyright 2022 (c) Anna Schumaker.
|
|
"""Tests our custom Path class."""
|
|
import pathlib
|
|
import unittest
|
|
import emmental.path
|
|
|
|
|
|
class TestPath(unittest.TestCase):
|
|
"""Test our path module."""
|
|
|
|
def test_from_uri(self):
|
|
"""Test getting a path from a uri."""
|
|
p = emmental.path.from_uri("file:///a/b/c.txt")
|
|
self.assertIsInstance(p, pathlib.Path)
|
|
self.assertEqual(str(p), "/a/b/c.txt")
|
|
|
|
p = emmental.path.from_uri("file:///a/b%20c/d.txt")
|
|
self.assertEqual(str(p), "/a/b c/d.txt")
|
|
|
|
p = emmental.path.from_uri("/a/b/c.txt")
|
|
self.assertEqual(str(p), "/a/b/c.txt")
|