Skip to content

Commit 287f8f4

Browse files
committed
test_doc_examples.py: initialize examples_path.
While trying to package the Python nixio module in Debian, most tests from test_doc_examples.py are failing with the following error: def handle_lif(self): > lif_path = Path.joinpath(self.examples_path, "lif.py") E AttributeError: 'TestDocumentationExamples' object has no attribute 'examples_path' This looks to be caused by missing initialisation of the examples_path attribute of the TestDocumentationExamples class. Initialising the attribute with the path to the documentation from the root of the sources corrects the issue. Signed-off-by: Étienne Mollier <[email protected]>
1 parent 481847b commit 287f8f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nixio/test/test_doc_examples.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
class TestDocumentationExamples(unittest.TestCase):
1717

18+
examples_path = Path("docs/source/examples")
19+
1820
def run_script(self, script_name):
1921
file_path = Path.joinpath(self.examples_path, script_name)
2022
runpy.run_path(path_name=str(file_path), run_name="__main__")

0 commit comments

Comments
 (0)