diff options
Diffstat (limited to 'tests/test_libmat2.py')
| -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>') |
