From f48d9a47ca286717ab1c716ee4166be3353af6f1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 21 Oct 2013 11:34:49 +0530 Subject: [PATCH] Fix incorrect cleanup when building simple book for tests --- src/calibre/ebooks/oeb/polish/tests/base.py | 5 +- .../ebooks/oeb/polish/tests/index.html | 64 ------------------- 2 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 src/calibre/ebooks/oeb/polish/tests/index.html diff --git a/src/calibre/ebooks/oeb/polish/tests/base.py b/src/calibre/ebooks/oeb/polish/tests/base.py index 7dc4601539..4818127ac1 100644 --- a/src/calibre/ebooks/oeb/polish/tests/base.py +++ b/src/calibre/ebooks/oeb/polish/tests/base.py @@ -51,10 +51,7 @@ def get_simple_book(fmt='epub'): build_book(x, ans, args=['--level1-toc=//h:h2', '--language=en', '--authors=Kovid Goyal', '--cover=' + I('lt.png')]) finally: - try: - os.remove('index.html') - except: - pass + os.remove(x) return ans devnull = DevNull() diff --git a/src/calibre/ebooks/oeb/polish/tests/index.html b/src/calibre/ebooks/oeb/polish/tests/index.html deleted file mode 100644 index 6d9ad92835..0000000000 --- a/src/calibre/ebooks/oeb/polish/tests/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - A simple test page - - - - -

A simple test page

- -

To pursue pleasure rationally encounter consequences that are extremely -painful.

- -

Nor again is there anyone who loves or pursues or desires to obtain pain of -itself, because it is pain, but because occasionally circumstances occur in -which toil and pain can procure him some great pleasure. To take a trivial -example, which of us ever undertakes laborious physical exercise, except to -obtain some advantage from it? But who has any right to find fault with a man -who chooses to enjoy a pleasure that has no annoying consequences, or one who -avoids a pain that produces no resultant pleasure?

- -
test
- -

On the other hand.

- - - -

Another test page

- - -

The great explorer of the truth, the master-builder of human happiness. No -one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but -because those who do not know how to pursue pleasure rationally encounter -consequences that are extremely painful.

- -

Nor again is there anyone who loves or pursues or desires to obtain pain of -itself, because it is pain, but because occasionally circumstances occur in -which toil and pain can procure him some great pleasure. To take a trivial -example, which of us ever undertakes laborious physical exercise, except to -obtain some advantage from it? But who has any right.

- - - - - -