Source

fromtests._fixturesimport_GenericBackendTest,_GenericMutexTestfromtestsimporteq_fromunittestimportTestCasefromthreadingimportThreadimporttimeimportosfromnoseimportSkipTesttry:importfcntlexceptImportError:raiseSkipTest("fcntl not available")classDBMBackendTest(_GenericBackendTest):backend="dogpile.cache.dbm"config_args={"arguments":{"filename":"test.dbm"}}classDBMBackendNoLockTest(_GenericBackendTest):backend="dogpile.cache.dbm"config_args={"arguments":{"filename":"test.dbm","rw_lockfile":False,"dogpile_lockfile":False,}}classDBMMutexTest(_GenericMutexTest):backend="dogpile.cache.dbm"config_args={"arguments":{"filename":"test.dbm"}}defteardown():forfnameinos.listdir(os.curdir):iffname.startswith("test.dbm"):os.unlink(fname)