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

Give each test case a unique alphanumeric label #34

Open
cjerdonek opened this issue Jan 8, 2012 · 1 comment
Open

Give each test case a unique alphanumeric label #34

cjerdonek opened this issue Jan 8, 2012 · 1 comment
Labels
infrastructure structural changes not affecting test content

Comments

@cjerdonek
Copy link
Contributor

I think it would help if each test case were given a unique alphanumeric label or id (with underscores). I think this would make it a bit easier to reference specific test cases.

So instead of saying the "Interpolation - Multiple Calls" lambda test case, for example, you could say the lambda_interpolation_multiple_calls test case.

This would also make it easier to reference a test case in one's code, say, if you were maintaining a skip list or if you wanted an unambiguous way to generate a variable or function name from a test case. The current "name" value currently can include things like hyphens, colons, spaces, and parentheses.

@samwyse
Copy link

samwyse commented Sep 9, 2013

Since this issue has been open for two years, I'm going to vote to reject it.The test names are unique per page, which I think is adequate. In Python, for example, you can use the following to generate your example variable or function name from a test case.

def normalize(page, name):
    lst = re.split(r'\W+', test.lower())
    lst.insert(0, page)
    return '_'.join(lst)

>>> normalize('lambda', 'Interpolation - Multiple Calls')
'lambda_interpolation_multiple_calls'

@jgonggrijp jgonggrijp added the infrastructure structural changes not affecting test content label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure structural changes not affecting test content
Projects
None yet
Development

No branches or pull requests

3 participants