* Some `# pragma: no cover' added where it's more pain to get coverage
than to put up with lack of testing.
We are choosing to NOT test retry_lock() or the call to it from
update_lock() as it's tkinter stuff.
* Check `self.journal_dir_lockfile` exists before trying to call
.close() on it.
* Note where platform checks means only one if branch gets run, so of
course coverage will complain about the other one.
* Add test_release_lock_lie_locked() to test when not locked, but
pretend we were so release_lock() returns False.
* Add test_update_lock_same() to check if an attempt is made to 'update'
to the same directory.
* update_lock() wants to, potentially, invoke
JournalLock.JournalAlreadyLocked() instance for a tkinter pop-up.
We do *not* want to mock all of that, so monkeypatch a mock so that in
the 'test PASSED' case this just works.
This splits the code for opening the lockfile away from that for
actually obtaining the lock. It enables a test for trying to lock again
with the same file handle.
* On win32 this uses pywin32 package modules, so that's now in
requirements-dev.txt.
* I *think* that code is as clean as it's going to be. Windows is a
pain with having you *append* a Deny ACL (rather than remove an Allow
one), and then you have to find it in all the ACLs for the object in
order to remove it by index.
* Linux version of this using `os.chmod()` currently untested.
Only tested under win32 so far, but I'd hope os.chmod() is the way to go
on Linux and macOS.
The win32 implementation currently relies on the pywin32 package being
installed in order to use its ntsecuritycon and win32security modules.
It might be possible to do this with ctypes instead, but this sure looks
cleaner than most ctypes code I've seen.
* mock get_str() is now via a fixture so it can be re-used in more than
one test, avoiding DRY issue.
* Some actual tests, in the form of asserts, added to
test_journal_lock_init().
In general I think this will keep things neater:
1. Create a directory inside tests/ named after the file the tests are
for.
2. Put all files for that test inside this new directory.
* Extend EDCD copyright into 2021 here as well.
* Recommend *against* any attempt at making plugins also work with
Python 2.7.
* setup.py no longer writes appcast files. Mention
edmarketconnector.xml enclosure instead for the url= bit.
* DRY about location of log files, just point to appropriate wiki link.
Nothing other than /shipyard actually returns the modules and ships
data, so checking for it anywhere other than that automatically is just
asking for extra log noise and nothing else.