From 23c4ae86b630b2dc8e6bcc582250740a5438daa7 Mon Sep 17 00:00:00 2001 From: Frank Harrison Date: Tue, 7 Apr 2020 17:52:16 +0100 Subject: Handles failing file-delete when skipping import_graph tests We skip these tests if/when we run benchmarking only (force sha update) --- tests/test_import_graph.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_import_graph.py') diff --git a/tests/test_import_graph.py b/tests/test_import_graph.py index d7b009693..2e5d0a567 100644 --- a/tests/test_import_graph.py +++ b/tests/test_import_graph.py @@ -23,7 +23,11 @@ from pylint.lint import PyLinter def dest(): dest = "dependencies_graph.dot" yield dest - os.remove(dest) + try: + os.remove(dest) + except FileNotFoundError: + # file may not have been created if tests inside fixture skipped + pass def test_dependencies_graph(dest): -- cgit v1.2.1