def setUp(self): self.path = os.path.join(gettempdir(), "wsgidav-props.shelve") # Note: os.remove(self.path) does not work, because Shelve may append # a file extension. # if os.path.exists(self.path): # os.remove(self.path) self.pm = property_manager.ShelvePropertyManager(self.path) self.pm._verbose = 1
def setUp(self): if sys.version_info < (3, 0): modifier = "-py2" # shelve formats are incompatible else: modifier = "-py3" self.path = os.path.join(gettempdir(), "wsgidav-props{}.shelve".format(modifier)) # Note: os.remove(self.path) does not work, because Shelve may append # a file extension. # if os.path.exists(self.path): # os.remove(self.path) self.pm = property_manager.ShelvePropertyManager(self.path) self.pm._verbose = 2
def setUp(self): self.path = os.path.join(gettempdir(), "wsgidav-props.shelve") if os.path.exists(self.path): os.remove(self.path) self.pm = property_manager.ShelvePropertyManager(self.path) self.pm._verbose = 1