mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-16 20:20:29 +03:00
tests: close files
This commit is contained in:
parent
f7e9022217
commit
00bd75aa8c
3 changed files with 10 additions and 5 deletions
|
|
@ -63,11 +63,13 @@ class BuildTest(unittest.TestCase):
|
|||
'source-files/Zillode/syncthing-silk/build.gradle',
|
||||
'source-files/open-keychain/open-keychain/build.gradle',
|
||||
'source-files/osmandapp/osmand/build.gradle'):
|
||||
filedata = open(os.path.join(testsdir, f)).read()
|
||||
with open(os.path.join(testsdir, f), 'r') as f:
|
||||
filedata = f.read()
|
||||
self.assertIsNotNone(pattern.search(filedata))
|
||||
tp = os.path.join(testsdir,
|
||||
'source-files/open-keychain/open-keychain/OpenKeychain/build.gradle')
|
||||
filedata = open(tp).read()
|
||||
with open(tp, 'r') as f:
|
||||
filedata = f.read()
|
||||
self.assertIsNone(pattern.search(filedata))
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue