# Path: wdom/util.py
# def reset() -> None:
#     """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
#     from wdom.element import Element
#     from wdom.server import _tornado
#     from wdom.window import customElements
# 
#     set_document(get_new_document())
#     _tornado.connections.clear()
#     _tornado.set_application(_tornado.Application())
#     Element._elements_with_id.clear()
#     Element._element_buffer.clear()
#     customElements.reset()


import unittest
from wdom.util import reset
#!/usr/bin/env python3
# -*- coding: utf-8 -*-




class TestCase(unittest.TestCase):
    """Base class for testing wdom modules.

    This class is a sub class of the ``unittest.TestCase``. After all test
    methods, reset wdom's global objects like document, application, and
    elements. If you use ``tearDown`` method, do not forget to call
    ``super().tearDown()``.
    """

    def setUp(self) -> None:
        """Reset WDOM states."""
        super().setUp()

# Path: wdom/util.py
# def reset() -> None:
#     """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
#     from wdom.element import Element
#     from wdom.server import _tornado
#     from wdom.window import customElements
# 
#     set_document(get_new_document())
#     _tornado.connections.clear()
#     _tornado.set_application(_tornado.Application())
#     Element._elements_with_id.clear()
#     Element._element_buffer.clear()
#     customElements.reset()


# Path: tests/base.py
import unittest
from wdom.util import reset

#!/usr/bin/env python3
# -*- coding: utf-8 -*-




class TestCase(unittest.TestCase):
    """Base class for testing wdom modules.

    This class is a sub class of the ``unittest.TestCase``. After all test
    methods, reset wdom's global objects like document, application, and
    elements. If you use ``tearDown`` method, do not forget to call
    ``super().tearDown()``.
    """

    def setUp(self) -> None:
        """Reset WDOM states."""
        super().setUp()

        reset()