From 709ad37b2f064e6e48604e8a8c40c04c88f0c338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Thu, 6 Aug 2020 17:10:13 +0700 Subject: [PATCH] Make assertion failure give better message (#8692) --- news/9f8da1d9-dd18-47e9-b334-5eb862054409.trivial | 0 tests/functional/test_install_check.py | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 news/9f8da1d9-dd18-47e9-b334-5eb862054409.trivial diff --git a/news/9f8da1d9-dd18-47e9-b334-5eb862054409.trivial b/news/9f8da1d9-dd18-47e9-b334-5eb862054409.trivial new file mode 100644 index 000000000..e69de29bb diff --git a/tests/functional/test_install_check.py b/tests/functional/test_install_check.py index 96ed6b6e1..a173cb550 100644 --- a/tests/functional/test_install_check.py +++ b/tests/functional/test_install_check.py @@ -2,9 +2,8 @@ from tests.lib import create_test_package_with_setup def assert_contains_expected_lines(string, expected_lines): - lines = string.splitlines() for expected_line in expected_lines: - assert any(line.endswith(expected_line) for line in lines) + assert (expected_line + '\n') in string def test_check_install_canonicalization(script):