Home | Trees | Indices | Help |
|
---|
|
Helper classes for the DaCHS' unit tests.
WARNING: This messes up some global state. DO NOT import into modules doing regular work. testtricks is the module for that kind for stuff.
Classes | |
FakeSimbad we monkeypatch simbadinterface such that we don't query simbad during tests. |
|
ResourceInstance A helper class for TestResource. |
|
TestResource A wrapper for testresources maintaining some backward compatibility. |
|
ForkingSubprocess A subprocess that doesn't exec but fork. |
|
VerboseTest A TestCase with a couple of convenient assert methods. |
|
SamplesBasedAutoTest A metaclass that builds tests out of a samples attribute of a class. |
|
SimpleSampleComparisonTest A base class for tests that simply run a function and compare for equality. |
|
StandIn A class having the attributes passed as kwargs to the constructor. |
|
FakeContext A scaffolding class for testing renderers. |
|
CatchallUI A replacement for base.ui, collecting the messages being sent. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
TEST_BASE =
|
|
originalEnvironment =
|
|
dbname = "dachstest"
|
|
dsn = initdachs.DSN(dbname)
|
|
__package__ =
|
|
__warningregistry__ =
|
Function Details |
removes IDs and some other detritus from XML literals. The result will be invalid XML, and all this assumes the fixed-prefix logic of the DC software. For new tests, you should just getXMLTree and XPath tests. |
returns a dictionary containing a 2D WCS structure for an image centered at pos with angular size. Both are 2-tuples in degrees. |
runs callable(*args, **kwargs) and captures the output. The function returns a tuple of return value, stdout output, stderr output. |
A context manager recording UI events. The object returned by the context manager is a CatchallUI; get the events accumulated during the run time in its events attribute.
|
runs a server in a thread and returns thread and base url. onlyOnce will configure the server such that it destroys itself after having handled one request. The thread would still need to be joined. So, better use the DataServer context manager. |
a context manager for briefly running a web server returning data. This yields the base URL the server is listening on.
|
a context manager to temporarily set some content to userconfig. This cleans up after itself and clears any userconfig cache before it sets to work. content are RD elements without the root (resource) tag.
|
Variables Details |
originalEnvironment
|
__warningregistry__
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |