[ENH] RecentFiles: Check for missing file in workflow dir#3064
[ENH] RecentFiles: Check for missing file in workflow dir#3064lanzagar merged 1 commit intobiolab:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3064 +/- ##
==========================================
+ Coverage 82.35% 82.36% +0.01%
==========================================
Files 335 336 +1
Lines 58258 58289 +31
==========================================
+ Hits 47979 48011 +32
+ Misses 10279 10278 -1 |
lanzagar
left a comment
There was a problem hiding this comment.
While the travis tests pass (if you also fix one of the pylint warnings it will not complain and everything will be green),
appveyor errors out on your new unit test. Can you please check why windows have a problem with it.
56978e4 to
10b5db9
Compare
| ) | ||
| search_paths = [("basedir", os.getcwd())] | ||
| self.assertIsNotNone(recent_path.resolve(search_paths)) | ||
| os.remove("test.tab") |
There was a problem hiding this comment.
This looks like a classic trap of removing a file at the end, which might not happen if something goes wrong before the remove statement.
And here it is actually not that unusual since you have an assert above that might fail - try running this test on master.
I think there should be some utility functions for testing on temporary files somewhere... In any case some form of finally: cleanup is needed and I suggest using python's TemporaryFiles too.
efda734 to
90ecf9a
Compare
b3f7b66 to
3928461
Compare
When opening saved workflow and file widget detects missing file, check if the file is placed in the same directory as workflow is saved.
Description of changes
When opening saved workflow and file widget detects missing file, check if the file is placed in the same directory as workflow is saved.
Includes