Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Releases: StratoDem/dash-snapshot-testing

v1.2.2

15 May 16:15

Choose a tag to compare

Fixes

  • Adds support for None type to comparison method

Changed

  • Added long_description to setup.py for PyPI package page

v1.2.0

15 May 15:54
f615a08

Choose a tag to compare

Changed

  • Improves clarity of error messages for large component comparisons
    Old logic:
    raise AssertionError with large string difference between JSON objects if the component did not match the snapshot, which led to difficult to read error message like:
    AssertionError: {'pro[136 chars]en': 'another one'}, 'namespace': 'dash_html_c[77 chars]Div'} != {'pro[136 chars]en': [1, 2, 3]}, 'namespace': 'dash_html_compo[73 chars]Div'}
    
    New logic:
    raise AssertionError with large string difference between JSON objects if the component does not match the snapshot, and
    add new details section about the first local mismatch between the component and snapshot:
    DETAILS:
    
    <class 'list'> != <class 'str'>
    CONTEXT 1:
    
    {"children": [1, 2, 3]}
    
    CONTEXT 2:
    
    {"children": "another one"}
    
    or
    DETAILS:
    
    P != Span
    CONTEXT 1:
    
    {"type": "P", "props": {"children": "another one"}, "namespace": "dash_html_components"}
    
    CONTEXT 2:
    
    {"type": "Span", "props": {"children": "another one"}, "namespace": "dash_html_components"}
    

v1.1.0

16 Apr 19:20
8714550

Choose a tag to compare

Added

  • This package now checks for an environment variable (UPDATE_DASH_SNAPSHOTS) and will automatically overwrite snapshots if it is set to TRUE

Example:

# This will run and make new snapshots
> UPDATE_DASH_SNAPSHOTS=TRUE python -m unittest my_test_module
# This will run against the previous snapshots
> python -m unittest my_test_module

v1.0.1

27 Mar 13:42

Choose a tag to compare

Added

  • MIT License

v1.0.0

27 Mar 13:39
becc6eb

Choose a tag to compare

Added

  • Initial publication