forked from docs/doc-exports
Improve comparison
Reviewed-by: Goncharov, Artem <artem.goncharov@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
parent
2c9359c16c
commit
02ea98d597
@ -35,8 +35,14 @@ class OTCComparator:
|
|||||||
t1 = original.find(body_filter)
|
t1 = original.find(body_filter)
|
||||||
t2 = new.find(body_filter)
|
t2 = new.find(body_filter)
|
||||||
if t1 != t2:
|
if t1 != t2:
|
||||||
logging.error("Content mismatch")
|
if t1.get_text() != t2.get_text():
|
||||||
|
logging.error(
|
||||||
|
"File %s is not matching, but "
|
||||||
|
"plain text matches" % file_name)
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
logging.error("File %s mismatches" % file_name)
|
||||||
|
else:
|
||||||
logging.info("Content matches")
|
logging.info("Content matches")
|
||||||
return True
|
return True
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user