Simplified "test_docstrings.py" and "test_embedded_sigs.py".

The tests in those files shared similar, somewhat convoluted logic.  A more
functional approach is now done, which makes it more clear and more concise.