Windows Support: Testing Suite integration

Broaden support for execution of the test suite
on Windows.
General bug and review fixups
This commit is contained in:
John Parent
2022-03-16 16:41:34 -04:00
committed by Peter Scheibel
parent e63b4f752a
commit 4aee27816e
102 changed files with 771 additions and 1066 deletions

View File

@@ -191,6 +191,7 @@ def is_valid(op):
return op == LockType.READ \
or op == LockType.WRITE
class Lock(object):
"""This is an implementation of a filesystem lock using Python's lockf.
@@ -617,6 +618,12 @@ def release_write(self, release_fn=None):
else:
return False
def cleanup(self):
if self._reads == 0 and self._writes == 0:
os.unlink(self.path)
else:
raise LockError("Attempting to cleanup active lock.")
def _get_counts_desc(self):
return '(reads {0}, writes {1})'.format(self._reads, self._writes) \
if tty.is_verbose() else ''