mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-06-03 06:10:10 +02:00
remove all references to optparse (deprecated since Python 3.2)
This commit is contained in:
parent
717df09be0
commit
1e5699e90c
|
@ -182,7 +182,7 @@ def main():
|
||||||
"can not be specified at the same time."))
|
"can not be specified at the same time."))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Trick optparse into displaying the right usage when --help is used.
|
# Trick argparse into displaying the right usage when --help is used.
|
||||||
sys.argv[0] += ' ' + command
|
sys.argv[0] += ' ' + command
|
||||||
|
|
||||||
del sys.argv[1]
|
del sys.argv[1]
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
@ -1104,15 +1103,17 @@ class BuildTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(BuildTest))
|
newSuite.addTest(unittest.makeSuite(BuildTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -336,15 +335,17 @@ class CheckupdatesTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(CheckupdatesTest))
|
newSuite.addTest(unittest.makeSuite(CheckupdatesTest))
|
||||||
|
|
|
@ -9,7 +9,6 @@ import importlib
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import ruamel.yaml
|
import ruamel.yaml
|
||||||
|
@ -22,6 +21,7 @@ import unittest
|
||||||
import textwrap
|
import textwrap
|
||||||
import yaml
|
import yaml
|
||||||
import gzip
|
import gzip
|
||||||
|
from argparse import ArgumentParser
|
||||||
from zipfile import BadZipFile, ZipFile
|
from zipfile import BadZipFile, ZipFile
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -3294,15 +3294,15 @@ class ConfigOptionsScopeTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = ArgumentParser()
|
||||||
parser.add_option(
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(CommonTest))
|
newSuite.addTest(unittest.makeSuite(CommonTest))
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -390,15 +389,17 @@ class DeployTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(DeployTest))
|
newSuite.addTest(unittest.makeSuite(DeployTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -57,15 +56,17 @@ class ExceptionTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.exception.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.exception.options = parser.parse_args(['--verbose'])
|
||||||
fdroidserver.common.options = fdroidserver.exception.options
|
fdroidserver.common.options = fdroidserver.exception.options
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
@ -75,15 +74,17 @@ class GpgsignTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(GpgsignTest))
|
newSuite.addTest(unittest.makeSuite(GpgsignTest))
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import git
|
import git
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
@ -161,15 +160,17 @@ class ImportTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(ImportTest))
|
newSuite.addTest(unittest.makeSuite(ImportTest))
|
||||||
|
|
|
@ -5,7 +5,6 @@ import datetime
|
||||||
import glob
|
import glob
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -942,15 +941,17 @@ class AltstoreIndexTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(options, args) = parser.parse_args(["--verbose"])
|
options = parser.parse_args(["--verbose"])
|
||||||
Options.verbose = options.verbose
|
Options.verbose = options.verbose
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import optparse
|
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -75,15 +74,17 @@ class InitTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.init.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.init.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(InitTest))
|
newSuite.addTest(unittest.makeSuite(InitTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -38,15 +37,17 @@ class InstallTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.install.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.install.options = parser.parse_args(['--verbose'])
|
||||||
fdroidserver.common.options = fdroidserver.install.options
|
fdroidserver.common.options = fdroidserver.install.options
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import ruamel.yaml
|
import ruamel.yaml
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -527,15 +526,17 @@ class LintAntiFeaturesTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.lint.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.lint.options = parser.parse_args(['--verbose'])
|
||||||
fdroidserver.common.options = fdroidserver.lint.options
|
fdroidserver.common.options = fdroidserver.lint.options
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import pkgutil
|
import pkgutil
|
||||||
|
@ -265,15 +264,17 @@ class MainTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(MainTest))
|
newSuite.addTest(unittest.makeSuite(MainTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import copy
|
import copy
|
||||||
import io
|
import io
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import ruamel.yaml
|
import ruamel.yaml
|
||||||
|
@ -2447,15 +2446,17 @@ class PostMetadataParseTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(MetadataTest))
|
newSuite.addTest(unittest.makeSuite(MetadataTest))
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import requests
|
import requests
|
||||||
|
@ -126,15 +125,17 @@ class NetTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(NetTest))
|
newSuite.addTest(unittest.makeSuite(NetTest))
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -364,15 +363,17 @@ class NightlyTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(NightlyTest))
|
newSuite.addTest(unittest.makeSuite(NightlyTest))
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
@ -413,15 +412,17 @@ class PublishTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(PublishTest))
|
newSuite.addTest(unittest.makeSuite(PublishTest))
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -265,15 +264,17 @@ class RewriteMetaTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(RewriteMetaTest))
|
newSuite.addTest(unittest.makeSuite(RewriteMetaTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import glob
|
import glob
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -815,15 +814,17 @@ class Test_main(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTests(
|
newSuite.addTests(
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -59,15 +58,17 @@ class SignaturesTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(SignaturesTest))
|
newSuite.addTest(unittest.makeSuite(SignaturesTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -193,15 +192,17 @@ class SignindexTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(SignindexTest))
|
newSuite.addTest(unittest.makeSuite(SignindexTest))
|
||||||
|
|
|
@ -9,7 +9,6 @@ import hashlib
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -2271,15 +2270,17 @@ class TestParseFromPbxproj(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(UpdateTest))
|
newSuite.addTest(unittest.makeSuite(UpdateTest))
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -88,15 +87,17 @@ class VCSTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(fdroidserver.common.options, args) = parser.parse_args(['--verbose'])
|
fdroidserver.common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(VCSTest))
|
newSuite.addTest(unittest.makeSuite(VCSTest))
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import optparse
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
@ -94,15 +93,17 @@ class VerifyTest(unittest.TestCase):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
os.chdir(os.path.dirname(__file__))
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
import argparse
|
||||||
parser.add_option(
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument(
|
||||||
"-v",
|
"-v",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Spew out even more information than normal",
|
help="Spew out even more information than normal",
|
||||||
)
|
)
|
||||||
(common.options, args) = parser.parse_args(['--verbose'])
|
common.options = parser.parse_args(['--verbose'])
|
||||||
|
|
||||||
newSuite = unittest.TestSuite()
|
newSuite = unittest.TestSuite()
|
||||||
newSuite.addTest(unittest.makeSuite(VerifyTest))
|
newSuite.addTest(unittest.makeSuite(VerifyTest))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user