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:
Hans-Christoph Steiner 2024-05-08 16:26:46 +02:00
parent 685efa23d4
commit 18f3acc32e
53 changed files with 317 additions and 265 deletions

View file

@ -24,7 +24,7 @@ import fdroidserver
from fdroidserver import metadata
from fdroidserver.exception import MetaDataException
from fdroidserver.common import DEFAULT_LOCALE
from testcommon import TmpCwd, mkdtemp
from testcommon import TmpCwd, mkdtemp, parse_args_for_test
def _get_mock_mf(s):
@ -2455,7 +2455,7 @@ if __name__ == "__main__":
default=False,
help="Spew out even more information than normal",
)
fdroidserver.common.options = parser.parse_args(['--verbose'])
parse_args_for_test(parser, sys.argv)
newSuite = unittest.TestSuite()
newSuite.addTest(unittest.makeSuite(MetadataTest))