Skip to content

Add docstring as "Details" field in Backslash test metadata #79

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

Merged
merged 1 commit into from
Jul 25, 2018

Conversation

yaelmi3
Copy link

@yaelmi3 yaelmi3 commented Jul 19, 2018

  1. Add test_details configuration to the default config (off by default)
  2. Add a check in test_start: In case test_details is enabled and the test function contains dosctring, the description will be added as "test description" in the test metadata

@@ -119,9 +119,10 @@ def get_default_config(self):
// Cmdline(append="--session-label", metavar="LABEL"),
"blacklisted_warnings_category": [] // Doc(
'Specify warnings categories which should not be reported to backslash'),
"test_details": False // Doc(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaelmi3 I think this should be report_test_docstrings

@@ -259,6 +260,9 @@ def test_start(self):
if log_path:
kwargs.setdefault('metadata', {})['local_log_path'] = os.path.abspath(log_path)

if self.current_config.test_details and slash.test.get_test_function().__doc__:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the key we save should be just docstring?

1. Add report_test_docstrings configuration to the default config (off by default)
2. Add a check in test_start: In case test_details is enabled and the test function contains dosctring, the description will be added as "docstring" in the test metadata
@yaelmi3
Copy link
Author

yaelmi3 commented Jul 25, 2018

changes updated :)

@vmalloc vmalloc merged commit e8b24b8 into getslash:develop Jul 25, 2018
@vmalloc
Copy link
Member

vmalloc commented Jul 25, 2018

@yaelmi3 added to changelog as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants