MCPcopy Create free account
hub / github.com/Kitware/ParaView / TestFetchDataBasic

Function TestFetchDataBasic

Remoting/Application/Testing/Python/TestFetchData.py:18–43  ·  view source on GitHub ↗
(producer, allGather=False)

Source from the content-addressed store, hash-verified

16 return data.IsA("vtkImageData")
17
18def TestFetchDataBasic(producer, allGather=False):
19 print_info("TestFetchDataBasic")
20 dataMap = FetchData(producer, GatherOnAllRanks = allGather)
21
22 if not allGather and GetIsSymmetric() and GetRank() > 0:
23 # dataMap must be empty.
24 if dataMap:
25 print_error("FetchData should not deliver any data on satellites!")
26 return False
27 else:
28 dataRanks = [x for x in dataMap.keys()]
29
30 # ensure we got data from all rank.
31 numRanks = GetNumberOfRanks()
32
33 if len(dataRanks) != numRanks:
34 print_error("rank mismatch len(%s) != %d", repr(dataRanks), numRanks)
35 return False
36
37 # ensure we got valid data from all ranks
38 for rank, data in dataMap.items():
39 if not ValidateData(producer, data):
40 print_error("bad data from rank %d", rank)
41 return False
42
43 return True
44
45def TestFetchDataRanks(producer, ranks, allGather = False):
46 print_info("TestFetchDataRanks %s" % repr(ranks))

Callers 1

TestFetchData.pyFile · 0.85

Calls 7

FetchDataFunction · 0.85
GetIsSymmetricFunction · 0.85
GetNumberOfRanksFunction · 0.85
ValidateDataFunction · 0.85
GetRankFunction · 0.70
keysMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected