File: test_sybil.patch

package info (click to toggle)
pytest-mpi 0.6-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 404 kB
  • sloc: python: 2,070; makefile: 28; sh: 22
file content (16 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: pytest-mpi/docs/conftest.py
===================================================================
--- pytest-mpi.orig/docs/conftest.py	2022-03-17 01:18:33.457636933 +0100
+++ pytest-mpi/docs/conftest.py	2022-04-02 10:13:21.086405965 +0200
@@ -3,7 +3,10 @@
 import pytest
 
 from sybil import Sybil
-from sybil.parsers.codeblock import PythonCodeBlockParser
+try:     # sybil >= 3
+    from sybil.parsers.codeblock import PythonCodeBlockParser
+except ImportError:  # sybil < 3
+    from sybil.parsers.codeblock import CodeBlockParser as PythonCodeBlockParser
 from sybil.parsers.doctest import DocTestParser
 from sybil.parsers.skip import skip