[Pkg-mpd-commits] [python-mpd] 243/262: add command listfiles

Simon McVittie smcv at debian.org
Sun May 22 18:16:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch upstream
in repository python-mpd.

commit b1cd3a0b628af066ae405a5d391c2d684daeb6bc
Author: Jörg Thalheim <joerg at higgsboson.tk>
Date:   Fri Nov 21 16:35:28 2014 +0100

    add command listfiles
    
    yet another commit to resolve #44
---
 mpd.py  | 1 +
 test.py | 6 ++++++
 tox.ini | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/mpd.py b/mpd.py
index fce80ff..6513e94 100644
--- a/mpd.py
+++ b/mpd.py
@@ -144,6 +144,7 @@ _commands = {
     "list":               "_fetch_list",
     "listall":            "_fetch_database",
     "listallinfo":        "_fetch_database",
+    "listfiles":          "_fetch_database",
     "lsinfo":             "_fetch_database",
     "readcomments":       "_fetch_object",
     "search":             "_fetch_songs",
diff --git a/test.py b/test.py
index 2d59cd5..bcfc80c 100755
--- a/test.py
+++ b/test.py
@@ -366,6 +366,12 @@ class TestMPDClient(unittest.TestCase):
         res = self.client._read_stickers()
         self.assertEqual([('foo', 'bar'), ('l', 'b')], list(res))
 
+    def test_fetch_database(self):
+        self.MPDWillReturn('directory: foo\n', 'Last-Modified: 2014-01-23T16:42:46Z\n',
+            'file: bar.mp3\n', 'size: 59618802\n', 'Last-Modified: 2014-11-02T19:57:00Z\n',
+            'OK\n')
+        res = self.client.listfiles("/")
+
     def test_read_sticker_with_special_value(self):
         self.MPDWillReturn("sticker: foo==uv=vu\n", "OK\n")
         res = self.client._read_stickers()
diff --git a/tox.ini b/tox.ini
index 2eb2305..0c9f8ff 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py26,py27,py32,py33,pypy
+envlist = py26,py27,py32,py33,py34,pypy
 
 [testenv]
 deps = mock

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list