From d382e70d72f2213bcf296614dc429ba819da59e3 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Wed, 30 Sep 2020 19:53:00 +0200 Subject: [PATCH] Fix a potential issue in the test suite --- tests/nwtools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/nwtools.py b/tests/nwtools.py index 0b8896a3..e35d9e08 100644 --- a/tests/nwtools.py +++ b/tests/nwtools.py @@ -6,9 +6,12 @@ from itertools import chain from PyQt5.QtWidgets import qApp -def cmpFiles(fileOne, fileTwo, ignoreLines=[]): +def cmpFiles(fileOne, fileTwo, ignoreLines=None): """Compare two files, but optionally ignore lines given by a list. """ + if ignoreLines is None: + ignoreLines = [] + try: foOne = open(fileOne, mode="r", encoding="utf8") except Exception as e: