示例#1
0
 def setUp(self):
     customElements.clear()
     self.elm = Element('tag')
     self.c1 = Element('c1')
     self.c2 = Element('c2')
     self.c1.classList.add('c1')
     self.c2.classList.add('c2')
示例#2
0
 def setUp(self):
     customElements.clear()
     self.elm = Element('tag')
     self.c1 = Element('c1')
     self.c2 = Element('c2')
     self.c1.classList.add('c1')
     self.c2.classList.add('c2')
示例#3
0
文件: testing.py 项目: miyakogi/wdom
def reset():
    """Reset all wdom objects.

    This function clear all connections, elements, and resistered custom
    elements. This function also makes new document/application and set them.
    """
    from wdom.document import get_new_document, set_document

    set_document(get_new_document())
    from wdom.server import _tornado

    _tornado.connections.clear()
    _tornado.set_application(_tornado.Application())
    try:
        from wdom.server import _aiohttp

        _aiohttp.connections.clear()
        _aiohttp.set_application(_aiohttp.Application())
    except ImportError:
        pass
    Element._elements_with_id.clear()
    Element._elements.clear()
    customElements.clear()
示例#4
0
文件: test_tag.py 项目: miyakogi/wdom
 def setUp(self):
     customElements.clear()
     self.tag = Tag()
     self.c1 = Tag(c="1")
     self.c2 = Tag(c="2")
示例#5
0
 def setUp(self):
     customElements.clear()
     self.tag = Tag()
     self.c1 = Tag(c="1")
     self.c2 = Tag(c="2")