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

BCP-006-01: Test suites for NMOS With JPEG XS #715

Closed
wants to merge 6 commits into from

Conversation

garethsb
Copy link
Contributor

Starting a PR to address #714...

nmostesting/TestHelper.py Outdated Show resolved Hide resolved
'connectable': True, 'registered': True}]

# Randomly select some Receivers to be JPEG XS capable
jxsv_receivers = self._generate_random_indices(len(self.receivers), min_index_count=1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it would make sense to remove the defaults from this function, or express the defaults as proportions of the index_range passed in (50%, 100%, maybe, or 25%, 75%?)

def _generate_random_indices(self, index_range, min_index_count=2, max_index_count=4)

Copy link
Contributor

Choose a reason for hiding this comment

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

The reasoning for an explicit count rather than a proportion is for the case of testing pagination where the test specifies 2 results per page, and a minimum of 3 to force more than one page. Proportional percentages would be cumbersome in that context, I feel.

Reviewing the use of this function in the IS-04 and IS-05 tests, I'm not sure the max_index_count is needed - I will experiment with removing it. Also the min_index_count should default to 1, and then be overridden in the cases where a minimum needs to be specified to force pagination.

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