Skip to content
This repository was archived by the owner on Nov 8, 2020. It is now read-only.

Commit 175def2

Browse files
committed
Fix old sphinx release does not provide sphinx.version_info
1 parent 90bb281 commit 175def2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_TestApp_cleanup(self):
9696
app = TestApp(create_new_srcdir=True)
9797
self.assertTrue(app.builddir.exists())
9898

99-
if sphinx.version_info < (2, 0):
99+
if sphinx.__version__ < '2.0':
100100
with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
101101
app.cleanup()
102102
self.assertEqual(1, AutoDirective._registry.clear.call_count)
@@ -109,7 +109,7 @@ def test_TestApp_cleanup_when_cleanup_on_errors(self):
109109
app = TestApp(create_new_srcdir=True, cleanup_on_errors=False)
110110
self.assertTrue(app.builddir.exists())
111111

112-
if sphinx.version_info < (2, 0):
112+
if sphinx.__version__ < '2.0':
113113
with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
114114
app.cleanup(error=True)
115115
self.assertEqual(0, AutoDirective._registry.clear.call_count)
@@ -118,7 +118,7 @@ def test_TestApp_cleanup_when_cleanup_on_errors(self):
118118
app.cleanup(error=True)
119119
self.assertTrue(app.builddir.exists())
120120

121-
if sphinx.version_info < (2, 0):
121+
if sphinx.__version__ < '2.0':
122122
with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
123123
app.cleanup(error=None)
124124
self.assertEqual(1, AutoDirective._registry.clear.call_count)

0 commit comments

Comments
 (0)