Fix: Separate normal renderer output from diagnostics
This commit is contained in:
1 parent
69a8cb5647
commit
af8b83007f
11 files changed
+249
-90
No files matched your search
@@ -130,9 +130,9 @@ def endpoint_deviation(a, b):
|
||||
return mismatches, worst
|
||||
|
||||
|
||||
def trace_cost(stderr, label):
|
||||
def trace_cost(text, label):
|
||||
match = re.search(label + r' trace cost: accepted=(\d+) rejected=(\d+) '
|
||||
r'rhs=(\d+)', stderr)
|
||||
r'rhs=(\d+)', text)
|
||||
return None if match is None else match.groups()
|
||||
|
||||
|
||||
@@ -263,8 +263,8 @@ with tempfile.TemporaryDirectory(prefix='gr-adaptive-cli-',
|
||||
replay_hdr = replay_out.with_name(replay_out.stem + '_HDR.fits')
|
||||
assert dflt_out.with_name(dflt_out.stem + '_HDR.fits').read_bytes() \
|
||||
== replay_hdr.read_bytes()
|
||||
live_cost = trace_cost(dflt_run.stderr, 'Frame 0')
|
||||
replay_cost = trace_cost(replay_run.stderr, 'Imported map')
|
||||
live_cost = trace_cost(dflt_run.stdout, 'Frame 0')
|
||||
replay_cost = trace_cost(replay_run.stdout, 'Imported map')
|
||||
assert live_cost is not None and replay_cost is not None
|
||||
assert live_cost == replay_cost, (live_cost, replay_cost)
|
||||
|
||||
|
||||
Reference in new issue
Block a user