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

Test Case Ordinal Numbering zero-pads poorly #75

Closed
dambroc1 opened this issue Oct 24, 2019 · 1 comment
Closed

Test Case Ordinal Numbering zero-pads poorly #75

dambroc1 opened this issue Oct 24, 2019 · 1 comment
Assignees
Labels

Comments

@dambroc1
Copy link

When using the @DaTa decorator, DDT attempts to dynamically determine the zero-padding. The problem is, a global value is being set (index_len) for each test that calls @DaTa. But the value index_len is not used until all tests have been added. Meaning only the index_len of the last test in the suite is used. If I have test A that has 300 data sets, and test B that has 2 data sets, no zero padding will occur in the test name.

This is also making existing test names change if new tests or new data sets are added in the future.

I would suggest remove the zero-padding index_len altogether to avoid dynamic test case name changes. But if not, then index_len should use the max of all test cases that call @DaTa and not just the last one

@wswld
Copy link
Contributor

wswld commented Sep 27, 2021

@dambroc1 it took us some time to get there, but this issue seems to be fixed now.

@wswld wswld closed this as completed Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants