From bc4b8ebc8bc2f30c98a80c3bf9894666f7f3d04c Mon Sep 17 00:00:00 2001 From: Felix Crux Date: Mon, 12 Aug 2013 17:39:51 -0400 Subject: Documenting that json.load may raise a ValueError. Issue #18680: JSONDecoder should document that it raises a ValueError for malformed data --- Doc/library/json.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 433f948..f652039 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -328,6 +328,8 @@ Encoders and Decoders those with character codes in the 0-31 range, including ``'\t'`` (tab), ``'\n'``, ``'\r'`` and ``'\0'``. + If the data being deserialized is not a valid JSON document, a + :exc:`ValueError` will be raised. .. method:: decode(s) -- cgit v0.12 From 0d53860e2c9a280e11a1e2216ed0041c8a7ca632 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Mon, 12 Aug 2013 22:25:27 -0700 Subject: Increasing test coverage of ftplib. Patch by Muhammad Jehanzeb --- Lib/test/test_ftplib.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index dcf1fd9..3a99042 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -529,6 +529,14 @@ class TestFTPClass(TestCase): def test_rmd(self): self.client.rmd('foo') + def test_cwd(self): + dir = self.client.cwd('/foo') + self.assertEqual(dir, '250 cwd ok') + + def test_mkd(self): + dir = self.client.mkd('/foo') + self.assertEqual(dir, '/foo') + def test_pwd(self): dir = self.client.pwd() self.assertEqual(dir, 'pwd ok') -- cgit v0.12