diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-10-28 11:16:19 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-10-28 11:16:19 -0400 |
commit | 1c64a3f5614fcf6a350ef5661e3a3441b7fc3b10 (patch) | |
tree | 07c45b3f2f031bb38656349bd67bcd364fc052ef /cherrypy | |
parent | 57aac5b914a2a30f9ea76cdb6af18471ba45cf42 (diff) | |
download | cherrypy-git-1c64a3f5614fcf6a350ef5661e3a3441b7fc3b10.tar.gz |
Don't fail to remove a non-existent file. Fixes #1540.
Diffstat (limited to 'cherrypy')
-rwxr-xr-x | cherrypy/test/test_session.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cherrypy/test/test_session.py b/cherrypy/test/test_session.py index aabc9397..942f1bb9 100755 --- a/cherrypy/test/test_session.py +++ b/cherrypy/test/test_session.py @@ -6,6 +6,7 @@ import socket from six.moves.http_client import HTTPConnection import pytest +from path import Path import cherrypy from cherrypy._cpcompat import ( @@ -144,7 +145,8 @@ class SessionTest(helper.CPWebCase): # Clean up sessions. for fname in os.listdir(localDir): if fname.startswith(sessions.FileSession.SESSION_PREFIX): - os.unlink(os.path.join(localDir, fname)) + path = Path(localDir) / fname + path.remove_p() @pytest.mark.xfail(reason='#1534') def test_0_Session(self): @@ -290,7 +292,6 @@ class SessionTest(helper.CPWebCase): self.getPage('/iredir', self.cookies) self.assertBody('FileSession') - @pytest.mark.xfail(reason='#1540') def test_4_File_deletion(self): # Start a new session self.getPage('/testStr') @@ -300,7 +301,6 @@ class SessionTest(helper.CPWebCase): os.unlink(path) self.getPage('/testStr', self.cookies) - @pytest.mark.xfail(reason='#1557') def test_5_Error_paths(self): self.getPage('/unknown/page') self.assertErrorPage(404, "The path '/unknown/page' was not found.") |