diff options
| author | jvoisin | 2025-08-25 12:07:15 +0200 |
|---|---|---|
| committer | jvoisin | 2025-08-25 12:07:15 +0200 |
| commit | f07344444d6d2f04a1f93e2954f4910b194bee0c (patch) | |
| tree | 12ed6fd803a60f4b69d677408f8caa13d0ee96db | |
| parent | 473903b70e1b269a6110242a9c098a10c18554e2 (diff) | |
Fix a broken test
Reported-By: https://github.com/NixOS/nixpkgs/issues/436421
| -rw-r--r-- | tests/test_libmat2.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 2147ee8..19e47aa 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -640,12 +640,8 @@ class TestCleaning(unittest.TestCase): | |||
| 640 | 640 | ||
| 641 | with open('./tests/data/clean.html', 'w') as f: | 641 | with open('./tests/data/clean.html', 'w') as f: |
| 642 | f.write('<title><title><pouet/><meta/></title></title><test/>') | 642 | f.write('<title><title><pouet/><meta/></title></title><test/>') |
| 643 | p = web.HTMLParser('./tests/data/clean.html') | 643 | with self.assertRaises(ValueError): |
| 644 | self.assertTrue(p.remove_all()) | 644 | p = web.HTMLParser('./tests/data/clean.html') |
| 645 | with open('./tests/data/clean.cleaned.html', 'r') as f: | ||
| 646 | self.assertEqual(f.read(), '<title></title><test/>') | ||
| 647 | os.remove('./tests/data/clean.html') | ||
| 648 | os.remove('./tests/data/clean.cleaned.html') | ||
| 649 | 645 | ||
| 650 | with open('./tests/data/clean.html', 'w') as f: | 646 | with open('./tests/data/clean.html', 'w') as f: |
| 651 | f.write('<test><title>Some<b>metadata</b><br/></title></test>') | 647 | f.write('<test><title>Some<b>metadata</b><br/></title></test>') |
