diff --git a/wrolpi/media_path.py b/wrolpi/media_path.py index 71a4a198..af97dc4b 100644 --- a/wrolpi/media_path.py +++ b/wrolpi/media_path.py @@ -18,7 +18,7 @@ class MediaPath: self._path = path.absolute() def __repr__(self): - return f'' + return f'' @classmethod def _validate_path(cls, path: PATH_TYPE): diff --git a/wrolpi/test/test_media_path.py b/wrolpi/test/test_media_path.py index fd76b0a6..6c4f0626 100644 --- a/wrolpi/test/test_media_path.py +++ b/wrolpi/test/test_media_path.py @@ -43,3 +43,8 @@ class TestMediaPath(unittest.TestCase): # Error is raised when the path is not in the media path. self.assertRaises(ValueError, MediaPath, '/tmp/foo') + + def test_repr(self): + d = MediaPath('foo') + assert self.test_dir.name not in repr(d) + assert self.test_dir.name not in str(d)