MCPcopy Index your code
hub / github.com/python/mypy / add_test_name_suffix

Function add_test_name_suffix

mypy/test/data.py:800–810  ·  view source on GitHub ↗
(name: str, suffix: str)

Source from the content-addressed store, hash-verified

798
799
800def add_test_name_suffix(name: str, suffix: str) -> str:
801 # Find magic suffix of form "-foobar" (used for things like "-skip").
802 m = re.search(r"-[-A-Za-z0-9]+$", name)
803 if m:
804 # Insert suite-specific test name suffix before the magic suffix
805 # which must be the last thing in the test case name since we
806 # are using endswith() checks.
807 magic_suffix = m.group(0)
808 return name[: -len(magic_suffix)] + suffix + magic_suffix
809 else:
810 return name + suffix
811
812
813def is_incremental(testcase: DataDrivenTestCase) -> bool:

Callers 1

split_test_casesFunction · 0.85

Calls 2

lenFunction · 0.85
groupMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…