Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 642a0cc

Browse filesBrowse files
authored
small change (#64)
1 parent 63875fa commit 642a0cc
Copy full SHA for 642a0cc

File tree

1 file changed

+7
-6
lines changed
Filter options

1 file changed

+7
-6
lines changed

‎_unittests/ut_xrun_doc/test_documentation_examples.py

Copy file name to clipboardExpand all lines: _unittests/ut_xrun_doc/test_documentation_examples.py
+7-6
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ def add_test_methods(cls):
6565
fold = os.path.normpath(os.path.join(this, "..", "..", "_doc", "examples"))
6666
found = os.listdir(fold)
6767
for name in found:
68-
if name.startswith("plot_") and name.endswith(".py"):
69-
short_name = os.path.split(os.path.splitext(name)[0])[-1]
68+
if not name.startswith("plot_") or not name.endswith(".py"):
69+
continue
70+
short_name = os.path.split(os.path.splitext(name)[0])[-1]
7071

71-
def _test_(self, name=name):
72-
res = self.run_test(fold, name, verbose=VERBOSE)
73-
self.assertTrue(res)
72+
def _test_(self, name=name):
73+
res = self.run_test(fold, name, verbose=VERBOSE)
74+
self.assertTrue(res)
7475

75-
setattr(cls, f"test_{short_name}", _test_)
76+
setattr(cls, f"test_{short_name}", _test_)
7677

7778

7879
TestDocumentationExamples.add_test_methods()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.