From 5b423dfed384be115fd6ec58c395cb4c4233810a Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 20 Nov 2018 18:00:55 +0100 Subject: [PATCH] python api test: do not print out sigs, they keep changing and make comparisons impossible --- tests/pythonapi/doc.py | 8 ++++++-- tests/pythonapi/pythonapi.txt | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/pythonapi/doc.py b/tests/pythonapi/doc.py index 12519133..20aa9f70 100644 --- a/tests/pythonapi/doc.py +++ b/tests/pythonapi/doc.py @@ -36,10 +36,14 @@ for doc in query: print("doc.get(%s) -> [%s]"%(fld,utf8string(doc.get(fld)))) print("\nfor fld in sorted(doc.keys()):") for fld in sorted(doc.keys()): - print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld)))) + # Sig keeps changing and makes it impossible to compare test results + if fld != 'sig': + print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld)))) print("\nfor k,v in sorted(doc.items().items()):") for k,v in sorted(doc.items().items(), key=lambda itm: itm[0]): - print(utf8string("[%s] -> [%s]" % (k, v))) + # Sig keeps changing and makes it impossible to compare test results + if k != 'sig': + print(utf8string("[%s] -> [%s]" % (k, v))) print("\nAccented query:") uqs = u('title:"\u00e9t\u00e9 \u00e0 no\u00ebl"') diff --git a/tests/pythonapi/pythonapi.txt b/tests/pythonapi/pythonapi.txt index dddba7a4..ca42d4fb 100644 --- a/tests/pythonapi/pythonapi.txt +++ b/tests/pythonapi/pythonapi.txt @@ -24,7 +24,6 @@ for fld in sorted(doc.keys()): [pcbytes] -> [267] [rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|] [relevancyrating] -> [100%] -[sig] -> [2671383154417] [testfield] -> [testfieldvalue1] [title] -> [HTML fields test file: été à noël] [url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html] @@ -43,7 +42,6 @@ for k,v in sorted(doc.items().items()): [pcbytes] -> [267] [rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|] [relevancyrating] -> [100%] -[sig] -> [2671383154417] [testfield] -> [testfieldvalue1] [title] -> [HTML fields test file: été à noël] [url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]