MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / read_entries

Function read_entries

tensorflow/contrib/cmake/python_sanity_test.py:39–61  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

37
38
39def read_entries(test):
40 with open(abs_path(test.entries_file), "r") as f:
41 lines = f.readlines()
42
43 lines = [line.strip() for line in lines]
44 lines = [line for line in lines if line]
45
46 test.entries = []
47 test.whitelist = []
48
49 for line in lines:
50 # line is comment
51 if line.startswith("#"):
52 line = line[1:].strip()
53 # whitelist entry
54 if line.startswith("tensorflow/"):
55 test.whitelist.append(line)
56 # line has comment -> strip comment
57 elif line.find("#") != -1:
58 line = line[:line.find("#")].strip()
59 test.entries.append(line)
60 else:
61 test.entries.append(line)
62
63
64def test_invalid_directories(test):

Callers 3

setUpMethod · 0.85
setUpMethod · 0.85
setUpMethod · 0.85

Calls 5

abs_pathFunction · 0.85
readlinesMethod · 0.80
stripMethod · 0.80
appendMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected