Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor incremental tests #434

Merged
merged 8 commits into from
Jul 13, 2023
Merged

Commits on Jul 10, 2023

  1. tests: remove pytest-dependency and pytest incremental marker

    Previously, the tests were designed to be incremental so failing tests in
    low-level components would cancel higher level tests. This way, a failing
    low-level test would not result in an all-red test-suite where the actual issue
    is hard to find.
    This behavior can be achieved much simpler, by ordering all tests from
    low-level to high-level and stopping at the first error.
    
    This patch removes all old infrastructure which implemented the incremental
    tests, and orders the tests from low-level to high-level, by using numeric
    file prefixes.
    
    After this patch the test-suite has the following stages:
    
        00xx Testsuite tests
        01xx HTML Datastructure Tests
        02xx HTML API Tests
        03xx Basic IO and Rendering Tests
        04xx HTML API Browser Tests
        xxxx Misc
    
    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    98612f1 View commit details
    Browse the repository at this point in the history
  2. tests: rendering: refactor test parameter

    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    3a77a76 View commit details
    Browse the repository at this point in the history
  3. client2: rendering: add check for supported nodes

    client2 does not support `lona.html.Widget` and previously it would crash if it
    attempted to render widget nodes.
    
    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    d8c7904 View commit details
    Browse the repository at this point in the history
  4. server: use most abstract class of lona.responses for all checks

    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    241453c View commit details
    Browse the repository at this point in the history
  5. html: node list: add support for all iterables when resetting node lists

    Previously, `lona.html.Node.nodes` would only accept nodes and lists of nodes.
    This is unhandy when creating custom node classes and using `*args` and
    `**kwargs` since `*args` are tuples by default.
    
    This patch changes `lona.html.node_list.NodeList._reset()` to accept any kind
    of iterable.
    
    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    bb6cba4 View commit details
    Browse the repository at this point in the history
  6. html: add support for initializing widget data via node constructors

    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    43abe6a View commit details
    Browse the repository at this point in the history
  7. html: Widget: fix attribute error when comparing

    Previously, `lona.html.abstract_node.AbstractNode.__eq__()` would crash when
    one or both compared nodes where a widget.
    
    This patch fixes `lona.html.abstract_node.AbstractNode.__eq__()`, by adding
    proper compare logic for `lona.html.Widget`.
    
    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    f7fc6bc View commit details
    Browse the repository at this point in the history
  8. tests: html: add tests for node comparisons

    Signed-off-by: Florian Scherf <mail@florianscherf.de>
    fscherf committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    5f79f2a View commit details
    Browse the repository at this point in the history