verify.py (13213:71b959531dc3) | verify.py (13240:1c15c6d15766) |
---|---|
1#!/usr/bin/env python2 2# 3# Copyright 2018 Google, Inc. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 184 unchanged lines hidden (view full) --- 193 194class Checker(object): 195 def __init__(self, ref, test, tag): 196 self.ref = ref 197 self.test = test 198 self.tag = tag 199 200 def check(self): | 1#!/usr/bin/env python2 2# 3# Copyright 2018 Google, Inc. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 184 unchanged lines hidden (view full) --- 193 194class Checker(object): 195 def __init__(self, ref, test, tag): 196 self.ref = ref 197 self.test = test 198 self.tag = tag 199 200 def check(self): |
201 with open(self.text) as test_f, open(self.ref) as ref_f: | 201 with open(self.test) as test_f, open(self.ref) as ref_f: |
202 return test_f.read() == ref_f.read() 203 204def tagged_filt(tag, num): 205 return (r'\n{}: \({}{}\) .*\n(In file: .*\n)?' 206 r'(In process: [\w.]* @ .*\n)?').format(tag, tag[0], num) 207 208def error_filt(num): 209 return tagged_filt('Error', num) --- 360 unchanged lines hidden --- | 202 return test_f.read() == ref_f.read() 203 204def tagged_filt(tag, num): 205 return (r'\n{}: \({}{}\) .*\n(In file: .*\n)?' 206 r'(In process: [\w.]* @ .*\n)?').format(tag, tag[0], num) 207 208def error_filt(num): 209 return tagged_filt('Error', num) --- 360 unchanged lines hidden --- |