MCPcopy Index your code
hub / github.com/webpy/webpy / testRemovedSessionDir

Method testRemovedSessionDir

tests/test_session.py:115–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

113
114class DiskStoreTest(unittest.TestCase):
115 def testRemovedSessionDir(self):
116 # make sure `cleanup()` correctly returns when session directory was
117 # removed.
118 dir = tempfile.mkdtemp()
119 s = web.session.DiskStore(dir)
120 s["count"] = 20
121 self.assertEqual(s["count"], 20)
122 shutil.rmtree(dir)
123 time.sleep(2)
124 s.cleanup(1)
125
126 def testStoreConcurrent(self):
127 dir = tempfile.mkdtemp()

Callers

nothing calls this directly

Calls 1

cleanupMethod · 0.95

Tested by

no test coverage detected