generated from pyiron/pyiron_module_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add doctest * Fix import alarm example * Modify deprecator example to ignore the stated output I can't get the test to nicely see the error message; since we anyhow have unit tests for this I am not hung up on whether the docstrings remain perfectly verbatim correct and am content to leave the printed warning as plain-text docstring instead of tested-code docstring. * Skip deprecate doctests since checking warnings is awkward * Revert to nicer output formatting Now that doctest ignores it anyway --------- Co-authored-by: Marvin Poul <[email protected]>
- Loading branch information
Showing
3 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import doctest | ||
import pkgutil | ||
import unittest | ||
|
||
import pyiron_snippets | ||
|
||
|
||
def load_tests(loader, tests, ignore): | ||
for importer, name, ispkg in pkgutil.walk_packages( | ||
pyiron_snippets.__path__, pyiron_snippets.__name__ + '.' | ||
): | ||
tests.addTests(doctest.DocTestSuite(name)) | ||
return tests | ||
|
||
|
||
class TestTriggerFromIDE(unittest.TestCase): | ||
""" | ||
Just so we can instruct it to run unit tests here with a gui run command on the file | ||
""" | ||
|
||
def test_void(self): | ||
pass | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |