Skip to content

Conversation

rohanm-crest
Copy link

@rohanm-crest rohanm-crest commented Jul 29, 2025

Introduced a new variable, preserve_comments, to control whether comments are included when returning dict. When preserve_comments is set to True, comments will be included and vice versa

self.assertEqual(expected_item_dict, parser.item_dict())

def test_item_dict_when_preserve_comment_True(self):
Copy link
Member

Choose a reason for hiding this comment

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

Can we have a test which has conf, then item_dict and then dump to a string? I would expect to see the same as in the original conf.

EVAL-deprecated_field = "old_value"
def test_item_dict_when_preserve_comment_False(self):
parser = conf_parser.TABConfigParser()
parser.read(CONF_PATH)
Copy link
Member

Choose a reason for hiding this comment

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

nit: you could inline the conf and parametrize the test to stay consistent with other tests but totally up to you

Copy link
Author

Choose a reason for hiding this comment

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

I did try it earlier with @pytest.mark.parametrize but for some reason test were failing.

@rohanm-crest rohanm-crest marked this pull request as ready for review July 31, 2025 07:11
@rohanm-crest
Copy link
Author

The final decision is to revert the PR because the feature is currently not needed and requires further enhancements. These improvements will be addressed in the UCC 6 major release, so this PR is no longer necessary.
Reverted splunk/addonfactory-ucc-generator#1873

@github-actions github-actions bot locked and limited conversation to collaborators Aug 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants