llama.test.test_listeners.test_gcn module

Unit tests for llama.listen.gcn.

class llama.test.test_listeners.test_gcn.AbstractGcndTester

Bases: llama.test.test_listeners.test_gcn.AbstractTestLlamaHandlers

Test gcnd’s ability to listen for an parse events. gcnd has to be in your “$PATH” for this to work along with pygcn-serve. Tests the same thing as AbstractFileGenerationComparator, but does so in a more robust way by using the command line interface to test the script’s functionality.

SLEEP_INTERVAL = 0.25
TIMEOUT = 6
execute()

Launch gcnd and make it listen to a test server set up with pygcn-serve. Let run for 5 seconds before timing out and killing.

class llama.test.test_listeners.test_gcn.AbstractTestLlamaHandlers

Bases: llama.test.classes.AbstractFileGenerationComparator

Test LlamaHandlers with example GCN Notices to make sure that they are parsed correctly. Implementations of this class must provide an EVENTID class variable specifying the eventid to use (the rundir will be a temporary directory and the data source will be in the test data directory).

STARTING_MANIFEST = ()
execute()

Test whether the LLAMA handler properly creates the expected event directory and output files by comparing what is created to the expected output.

gcn_archive

A temporary directory for storing GCN archived files.

gcn_file_handler

Return the specific subclass of LVCGcnXml used to process this GCN Notice. Depends on the type of GCN Notice.

handler

Get a LlamaHandlers instance for this test class.

pipeline

A Pipeline instance defining the output files generated by this test. These are the output files that will be compared by AbstractFileGenerationComparator.compare to make sure that all outputs are as expected (and, as a sanity check, that no inputs have been mutated).

test()

Run this test with execute and then check whether outputs are as expected with compare.

class llama.test.test_listeners.test_gcn.GcnInitialMixin

Bases: object

Specifies LVCInitialXml as the gcn_file_handler property.

gcn_file_handler
class llama.test.test_listeners.test_gcn.GcnPreliminaryMixin

Bases: object

Specifies LVCPreliminaryXml as the gcn_file_handler property.

gcn_file_handler
class llama.test.test_listeners.test_gcn.TestGcndS190425z

Bases: llama.test.classes.S190425zMixin, llama.test.test_listeners.test_gcn.GcnInitialMixin, llama.test.test_listeners.test_gcn.AbstractGcndTester

Test the daemon on the GCN Initial notice that came out with the first BNS event of O3 on April 25, 2019.

class llama.test.test_listeners.test_gcn.TestGcndS190521g

Bases: llama.test.classes.S190521gMixin, llama.test.test_listeners.test_gcn.GcnPreliminaryMixin, llama.test.test_listeners.test_gcn.AbstractGcndTester

Test the daemon on the GCN Preliminary notice that came out an early-O3 BBH event from May 21, 2019.

class llama.test.test_listeners.test_gcn.TestLlamaHandlerMS181101ab

Bases: llama.test.classes.MS181101abMixin, llama.test.test_listeners.test_gcn.GcnInitialMixin, llama.test.test_listeners.test_gcn.AbstractTestLlamaHandlers

Test LlamaHandlers on a sample GCN Initial notice for ER14.

class llama.test.test_listeners.test_gcn.TestLlamaHandlerS190425z

Bases: llama.test.classes.S190425zMixin, llama.test.test_listeners.test_gcn.GcnInitialMixin, llama.test.test_listeners.test_gcn.AbstractTestLlamaHandlers

Test LlamaHandlers on the GCN Initial notice that came out with the first BNS event of O3 on April 25, 2019

class llama.test.test_listeners.test_gcn.TestLlamaHandlerS190521g

Bases: llama.test.classes.S190521gMixin, llama.test.test_listeners.test_gcn.GcnPreliminaryMixin, llama.test.test_listeners.test_gcn.AbstractTestLlamaHandlers

Test LlamaHandlers parser on the GCN Preliminary notice that came out with an early-O3 BBH event from May 21, 2019.