mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
tests: close files
This commit is contained in:
parent
f7e9022217
commit
00bd75aa8c
3 changed files with 10 additions and 5 deletions
|
|
@ -140,10 +140,12 @@ class CommonTest(unittest.TestCase):
|
|||
|
||||
fdroidserver.common.prepare_source(FakeVcs(), app, build, testdir, testdir, testdir)
|
||||
|
||||
filedata = open(os.path.join(testdir, 'build.gradle')).read()
|
||||
with open(os.path.join(testdir, 'build.gradle'), 'r') as f:
|
||||
filedata = f.read()
|
||||
self.assertIsNotNone(re.search("\s+compileSdkVersion %s\s+" % testint, filedata))
|
||||
|
||||
filedata = open(os.path.join(testdir, 'AndroidManifest.xml')).read()
|
||||
with open(os.path.join(testdir, 'AndroidManifest.xml')) as f:
|
||||
filedata = f.read()
|
||||
self.assertIsNone(re.search('android:debuggable', filedata))
|
||||
self.assertIsNotNone(re.search('android:versionName="%s"' % build['version'], filedata))
|
||||
self.assertIsNotNone(re.search('android:versionCode="%s"' % build['vercode'], filedata))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue