diff options
| author | jvoisin | 2019-02-27 23:53:07 +0100 |
|---|---|---|
| committer | jvoisin | 2019-02-27 23:53:07 +0100 |
| commit | 55214206b5f0f1c12fec378967f89ef4cb5674f9 (patch) | |
| tree | 82c94503dfd1d844b4c53d9083c69483d9d4f68d /tests/test_corrupted_files.py | |
| parent | 73d2966e8c10eb6c083a2abacc53f3297d16376e (diff) | |
Improve the previous commit
- More tests
- More documentation
- Minor code cleanup
Diffstat (limited to 'tests/test_corrupted_files.py')
| -rw-r--r-- | tests/test_corrupted_files.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index b2cec00..4a16d51 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py | |||
| @@ -269,9 +269,6 @@ class TestCorruptedFiles(unittest.TestCase): | |||
| 269 | os.remove('./tests/data/clean.html') | 269 | os.remove('./tests/data/clean.html') |
| 270 | 270 | ||
| 271 | with open('./tests/data/clean.html', 'w') as f: | 271 | with open('./tests/data/clean.html', 'w') as f: |
| 272 | f.write('<meta><meta/></meta>') | ||
| 273 | f.write('<title><title>pouet</title></title>') | ||
| 274 | f.write('<title><mysupertag/></title>') | ||
| 275 | f.write('<doctitle><br/></doctitle><br/><notclosed>') | 272 | f.write('<doctitle><br/></doctitle><br/><notclosed>') |
| 276 | p = web.HTMLParser('./tests/data/clean.html') | 273 | p = web.HTMLParser('./tests/data/clean.html') |
| 277 | with self.assertRaises(ValueError): | 274 | with self.assertRaises(ValueError): |
| @@ -281,6 +278,7 @@ class TestCorruptedFiles(unittest.TestCase): | |||
| 281 | p.remove_all() | 278 | p.remove_all() |
| 282 | os.remove('./tests/data/clean.html') | 279 | os.remove('./tests/data/clean.html') |
| 283 | 280 | ||
| 281 | |||
| 284 | def test_epub(self): | 282 | def test_epub(self): |
| 285 | with zipfile.ZipFile('./tests/data/clean.epub', 'w') as zout: | 283 | with zipfile.ZipFile('./tests/data/clean.epub', 'w') as zout: |
| 286 | zout.write('./tests/data/dirty.jpg', 'OEBPS/content.opf') | 284 | zout.write('./tests/data/dirty.jpg', 'OEBPS/content.opf') |
