From 54fcdb98f3bdba4d74025ddd605b0e2e16a290d3 Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Thu, 9 Jun 2022 21:33:43 +0200 Subject: [PATCH] TestCalculateMbTocNumbers: test NotSupportedTOCError messages --- test/test_disc_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_disc_utils.py b/test/test_disc_utils.py index 260127974..5641ea88a 100644 --- a/test/test_disc_utils.py +++ b/test/test_disc_utils.py @@ -18,7 +18,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - from test.picardtestcase import PicardTestCase from picard.disc.utils import ( @@ -42,11 +41,11 @@ class TestCalculateMbTocNumbers(PicardTestCase): def test_calculate_mb_toc_numbers_invalid_track_numbers(self): entries = [TocEntry(1, 0, 100), TocEntry(3, 101, 200), TocEntry(4, 201, 300)] - with self.assertRaises(NotSupportedTOCError): + with self.assertRaisesRegex(NotSupportedTOCError, r"^Non-standard track number sequence: \(1, 3, 4\)$"): calculate_mb_toc_numbers(entries) def test_calculate_mb_toc_numbers_empty_entries(self): - with self.assertRaises(NotSupportedTOCError): + with self.assertRaisesRegex(NotSupportedTOCError, r"^Empty track list$"): calculate_mb_toc_numbers([]) def test_calculate_mb_toc_numbers_ignore_datatrack(self):