summaryrefslogtreecommitdiff
path: root/tests/test_ext_intersphinx.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-03-02 15:35:01 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-03-02 16:45:31 +0900
commit00e32eeeff54ff91590f9c31167c61357ab568d4 (patch)
tree1974138d1cd2d9a19484bce859878af48bd627b8 /tests/test_ext_intersphinx.py
parent05a9fd9cc97e73e66215e0679bb9ddf29f8089a7 (diff)
downloadsphinx-git-00e32eeeff54ff91590f9c31167c61357ab568d4.tar.gz
intersphinx: Add ZlibReader utility
Diffstat (limited to 'tests/test_ext_intersphinx.py')
-rw-r--r--tests/test_ext_intersphinx.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/test_ext_intersphinx.py b/tests/test_ext_intersphinx.py
index 4d028c151..ef9a3b35c 100644
--- a/tests/test_ext_intersphinx.py
+++ b/tests/test_ext_intersphinx.py
@@ -59,25 +59,19 @@ def test_read_inventory_v1():
def test_read_inventory_v2():
f = BytesIO(inventory_v2)
- invdata1 = read_inventory(f, '/util', posixpath.join)
-
- # try again with a small buffer size to test the chunking algorithm
- f = BytesIO(inventory_v2)
- invdata2 = read_inventory(f, '/util', posixpath.join, bufsize=5)
-
- assert invdata1 == invdata2
+ invdata = read_inventory(f, '/util', posixpath.join)
- assert len(invdata1['py:module']) == 2
- assert invdata1['py:module']['module1'] == \
+ assert len(invdata['py:module']) == 2
+ assert invdata['py:module']['module1'] == \
('foo', '2.0', '/util/foo.html#module-module1', 'Long Module desc')
- assert invdata1['py:module']['module2'] == \
+ assert invdata['py:module']['module2'] == \
('foo', '2.0', '/util/foo.html#module-module2', '-')
- assert invdata1['py:function']['module1.func'][2] == \
+ assert invdata['py:function']['module1.func'][2] == \
'/util/sub/foo.html#module1.func'
- assert invdata1['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc'
- assert invdata1['std:term']['a term'][2] == \
+ assert invdata['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc'
+ assert invdata['std:term']['a term'][2] == \
'/util/glossary.html#term-a-term'
- assert invdata1['std:term']['a term including:colon'][2] == \
+ assert invdata['std:term']['a term including:colon'][2] == \
'/util/glossary.html#term-a-term-including-colon'