mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
stick to default python sys.path
This commit is contained in:
parent
3a3803ea2d
commit
b257a3411a
@ -91,7 +91,6 @@ def find_plugins():
|
||||
|
||||
|
||||
def main():
|
||||
sys.path.append(os.getcwd())
|
||||
fdroid_modules = find_plugins()
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
|
@ -84,6 +84,9 @@ class MainTest(unittest.TestCase):
|
||||
f.write(textwrap.dedent("""\
|
||||
fdroid_summary = "ttt"
|
||||
main = lambda: pritn('all good')"""))
|
||||
test_path = sys.path.copy()
|
||||
test_path.append(tmpdir)
|
||||
with mock.patch('sys.path', test_path):
|
||||
with mock.patch('sys.argv', ['', 'testy']):
|
||||
with mock.patch('sys.exit') as exit_mock:
|
||||
fdroidserver.__main__.main()
|
||||
|
Loading…
Reference in New Issue
Block a user