mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 14:30:30 +03:00
split out options from read_config()
There is no longer any reason for these to be intertwined. This deliberately avoids touching some files as much as possible because they are super tangled and due to be replaced. Those files are: * fdroidserver/build.py * fdroidserver/update.py # Conflicts: # tests/testcommon.py # Conflicts: # fdroidserver/btlog.py # fdroidserver/import_subcommand.py
This commit is contained in:
parent
685efa23d4
commit
18f3acc32e
53 changed files with 317 additions and 265 deletions
|
|
@ -25,7 +25,7 @@ if localmodule not in sys.path:
|
|||
|
||||
import fdroidserver
|
||||
from fdroidserver import common, index, publish, signindex, update
|
||||
from testcommon import TmpCwd, mkdtemp
|
||||
from testcommon import TmpCwd, mkdtemp, parse_args_for_test
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class IndexTest(unittest.TestCase):
|
|||
|
||||
common.config = None
|
||||
common.options = Options
|
||||
config = common.read_config(common.options)
|
||||
config = common.read_config()
|
||||
config['jarsigner'] = common.find_sdk_tools_cmd('jarsigner')
|
||||
common.config = config
|
||||
signindex.config = config
|
||||
|
|
@ -751,7 +751,7 @@ class IndexTest(unittest.TestCase):
|
|||
yaml.dump(c, fp)
|
||||
os.system('cat config.yml')
|
||||
common.config = None
|
||||
common.read_config(Options)
|
||||
common.read_config()
|
||||
repodict = {'address': common.config['repo_url']}
|
||||
index.add_mirrors_to_repodict('repo', repodict)
|
||||
self.assertEqual(
|
||||
|
|
@ -951,8 +951,7 @@ if __name__ == "__main__":
|
|||
default=False,
|
||||
help="Spew out even more information than normal",
|
||||
)
|
||||
options = parser.parse_args(["--verbose"])
|
||||
Options.verbose = options.verbose
|
||||
parse_args_for_test(parser, sys.argv)
|
||||
|
||||
newSuite = unittest.TestSuite()
|
||||
newSuite.addTest(unittest.makeSuite(IndexTest))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue