-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪 Add snapshot testing for needs data (#1019)
Previously, the validity of needs data was tested by asserting for only specific keys and values. This commit adds snapshot testing, with https://github.com/tophat/syrupy, to more fully capture the generated data. This should help to better identify any regressions caused by future changes.
- Loading branch information
1 parent
c1682ba
commit 09277e3
Showing
20 changed files
with
8,972 additions
and
1,064 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
TEST_DEPENDENCIES = [ | ||
"pytest", | ||
"pytest-xdist", | ||
"syrupy", | ||
"responses", | ||
"lxml", | ||
"pyparsing!=3.0.4", | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# serializer version: 1 | ||
# name: test_api_add_type[test_app0] | ||
list([ | ||
dict({ | ||
'color': '#BFD8D2', | ||
'directive': 'story', | ||
'prefix': 'US_', | ||
'style': 'node', | ||
'title': 'User Story', | ||
}), | ||
dict({ | ||
'color': '#FEDCD2', | ||
'directive': 'spec', | ||
'prefix': 'SP_', | ||
'style': 'node', | ||
'title': 'Specification', | ||
}), | ||
dict({ | ||
'color': '#DF744A', | ||
'directive': 'impl', | ||
'prefix': 'IM_', | ||
'style': 'node', | ||
'title': 'Implementation', | ||
}), | ||
dict({ | ||
'color': '#DCB239', | ||
'directive': 'test', | ||
'prefix': 'TC_', | ||
'style': 'node', | ||
'title': 'Test Case', | ||
}), | ||
dict({ | ||
'color': '#000000', | ||
'directive': 'awesome', | ||
'prefix': 'AW_', | ||
'style': 'cloud', | ||
'title': 'Awesome', | ||
}), | ||
]) | ||
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# serializer version: 1 | ||
# name: test_build_needs[test_app0] | ||
dict({ | ||
'current_version': '', | ||
'project': 'Python', | ||
'versions': dict({ | ||
'': dict({ | ||
'filters': dict({ | ||
}), | ||
'filters_amount': 0, | ||
'needs': dict({ | ||
'ST_001': dict({ | ||
'arch': dict({ | ||
}), | ||
'avatar': '', | ||
'closed_at': '', | ||
'completion': '', | ||
'constraints': list([ | ||
]), | ||
'constraints_passed': True, | ||
'constraints_results': dict({ | ||
}), | ||
'content_id': 'ST_001', | ||
'created_at': '', | ||
'delete': None, | ||
'description': '', | ||
'docname': 'index', | ||
'doctype': '.rst', | ||
'duration': '', | ||
'external_css': 'external_link', | ||
'external_url': None, | ||
'full_title': 'Test story', | ||
'has_dead_links': '', | ||
'has_forbidden_dead_links': '', | ||
'hidden': '', | ||
'id': 'ST_001', | ||
'id_complete': 'ST_001', | ||
'id_parent': 'ST_001', | ||
'id_prefix': '', | ||
'is_external': False, | ||
'is_modified': False, | ||
'is_need': True, | ||
'is_part': False, | ||
'jinja_content': None, | ||
'layout': '', | ||
'links': list([ | ||
]), | ||
'max_amount': '', | ||
'max_content_lines': '', | ||
'modifications': 0, | ||
'params': '', | ||
'parent_need': '', | ||
'parent_needs': list([ | ||
]), | ||
'parent_needs_back': list([ | ||
]), | ||
'parts': dict({ | ||
}), | ||
'post_template': None, | ||
'pre_template': None, | ||
'prefix': '', | ||
'query': '', | ||
'section_name': 'Welcome to basic test’s documentation!', | ||
'sections': list([ | ||
'Welcome to basic test’s documentation!', | ||
]), | ||
'service': '', | ||
'signature': '', | ||
'specific': '', | ||
'status': 'open', | ||
'style': None, | ||
'tags': list([ | ||
]), | ||
'target_id': 'ST_001', | ||
'template': None, | ||
'title': 'Test story', | ||
'type': 'story', | ||
'type_name': 'User Story', | ||
'updated_at': '', | ||
'url': '', | ||
'url_postfix': '', | ||
'user': '', | ||
}), | ||
'US_38823': dict({ | ||
'arch': dict({ | ||
}), | ||
'avatar': '', | ||
'closed_at': '', | ||
'completion': '', | ||
'constraints': list([ | ||
]), | ||
'constraints_passed': True, | ||
'constraints_results': dict({ | ||
}), | ||
'content_id': 'US_38823', | ||
'created_at': '', | ||
'delete': None, | ||
'description': '', | ||
'docname': 'index', | ||
'doctype': '.rst', | ||
'duration': '', | ||
'external_css': 'external_link', | ||
'external_url': None, | ||
'full_title': 'No ID', | ||
'has_dead_links': '', | ||
'has_forbidden_dead_links': '', | ||
'hidden': '', | ||
'id': 'US_38823', | ||
'id_complete': 'US_38823', | ||
'id_parent': 'US_38823', | ||
'id_prefix': '', | ||
'is_external': False, | ||
'is_modified': False, | ||
'is_need': True, | ||
'is_part': False, | ||
'jinja_content': None, | ||
'layout': '', | ||
'links': list([ | ||
]), | ||
'max_amount': '', | ||
'max_content_lines': '', | ||
'modifications': 0, | ||
'params': '', | ||
'parent_need': '', | ||
'parent_needs': list([ | ||
]), | ||
'parent_needs_back': list([ | ||
]), | ||
'parts': dict({ | ||
}), | ||
'post_template': None, | ||
'pre_template': None, | ||
'prefix': '', | ||
'query': '', | ||
'section_name': 'Welcome to basic test’s documentation!', | ||
'sections': list([ | ||
'Welcome to basic test’s documentation!', | ||
]), | ||
'service': '', | ||
'signature': '', | ||
'specific': '', | ||
'status': 'open', | ||
'style': None, | ||
'tags': list([ | ||
]), | ||
'target_id': 'US_38823', | ||
'template': None, | ||
'title': 'No ID', | ||
'type': 'story', | ||
'type_name': 'User Story', | ||
'updated_at': '', | ||
'url': '', | ||
'url_postfix': '', | ||
'user': '', | ||
}), | ||
}), | ||
'needs_amount': 2, | ||
}), | ||
}), | ||
}) | ||
# --- |
Oops, something went wrong.