obspy.core.util.testing

Testing utilities for ObsPy.

copyright:

The ObsPy Development Team (devs@obspy.org)

license:

GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html)

Public Functions

compare_xml_strings

Simple helper function to compare two XML strings.

create_diverse_catalog

Create a catalog with a single event that has many features.

get_all_py_files

Return a list with full absolute paths to all .py files in ObsPy file tree.

remove_unique_ids

Removes unique ID parts of e.g.

setup_context_testcase

Use a contextmanager to set up a unittest test case.

streams_almost_equal

Return True if two streams are almost equal.

traces_almost_equal

Return True if the two traces are almost equal.

Private Functions

Warning

Private functions are mainly for internal/developer use and their API might change without notice.

_make_stats_dict

Return a dict of stats from trace optionally including processing.

Classes

WarningsCapture

Try hard to capture all warnings.