def test_get_ligolw_element(): from ligo.lw.ligolw import (Document, LIGO_LW) xmldoc = Document() llw = xmldoc.appendChild(LIGO_LW()) assert io_ligolw.get_ligolw_element(llw) is llw assert io_ligolw.get_ligolw_element(xmldoc) is llw with pytest.raises(ValueError): io_ligolw.get_ligolw_element(Document())
def test_get_ligolw_element(): from ligo.lw.ligolw import (Document, LIGO_LW) xmldoc = Document() llw = xmldoc.appendChild(LIGO_LW()) assert io_ligolw.get_ligolw_element(llw) is llw assert io_ligolw.get_ligolw_element(xmldoc) is llw with pytest.raises(ValueError): io_ligolw.get_ligolw_element(Document())
def llwtable(): from ligo.lw.ligolw import (Document, LIGO_LW) # build dummy document with two tables xmldoc = Document() llw = xmldoc.appendChild(LIGO_LW()) tables = [new_table('process'), new_table('sngl_ringdown')] for t in tables: llw.appendChild(t) return xmldoc
def llwtable(): from ligo.lw.ligolw import (Document, LIGO_LW) # build dummy document with two tables xmldoc = Document() llw = xmldoc.appendChild(LIGO_LW()) tables = [new_table('process'), new_table('sngl_ringdown')] for t in tables: llw.appendChild(t) return xmldoc