Exclude bypy/b from go test discovery

This commit is contained in:
Kovid Goyal
2024-08-23 11:27:54 +05:30
parent e51fda041e
commit 0c1d239b5f

View File

@@ -124,6 +124,8 @@ def find_testable_go_packages() -> tuple[set[str], dict[str, list[str]]]:
base = os.getcwd()
pat = re.compile(r'^func Test([A-Z]\w+)', re.MULTILINE)
for (dirpath, dirnames, filenames) in os.walk(base):
if 'b' in dirnames and os.path.basename(dirpath) == 'bypy':
dirnames.remove('b')
for f in filenames:
if f.endswith('_test.go'):
q = os.path.relpath(dirpath, base)