Skip to content

Commit e131de8

Browse files
committed
Remove unwanted test
1 parent 35f3a2f commit e131de8

2 files changed

Lines changed: 1 addition & 34 deletions

File tree

pythonforandroid/build.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,6 @@ def process_python_modules(ctx, modules, arch):
603603
# preserve the original module list
604604
processed_modules.extend(modules)
605605

606-
if len(modules) == 0:
607-
return processed_modules
608-
609606
# temp file for pip report
610607
fd, path = tempfile.mkstemp()
611608
os.close(fd)

tests/test_build.py

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def test_run_pymodules_install_optional_project_dir(self):
1919
"""
2020
ctx = mock.Mock(recipe_build_order=[])
2121
ctx.archs = [ArchARMv7_a(ctx), ArchAarch_64(ctx)]
22+
ctx.extra_index_urls = []
2223
modules = []
2324
project_dir = None
2425
with mock.patch('pythonforandroid.build.info') as m_info:
@@ -58,37 +59,6 @@ def test_is_wheel_compatible(self):
5859
assert not is_wheel_compatible("test-7.1.0-0-cp313-cp313-some_other_os.whl", arch, ctx)
5960
assert not is_wheel_compatible("mmh3-5.2.0-cp314-cp314t-win_amd64.whl", arch, ctx)
6061

61-
def test_strip_if_with_debug_symbols(self):
62-
ctx = mock.Mock(recipe_build_order=[])
63-
ctx.python_recipe.major_minor_version_string = "3.6"
64-
ctx.get_site_packages_dir.return_value = "test-doesntexist"
65-
ctx.build_dir = "nonexistant_directory"
66-
ctx.extra_index_urls = []
67-
ctx.archs = [ArchAarch_64(ctx)]
68-
69-
modules = ["mymodule"]
70-
project_dir = None
71-
with mock.patch('pythonforandroid.build.info'), \
72-
mock.patch('sh.Command'), \
73-
mock.patch('pythonforandroid.build.open'), \
74-
mock.patch('pythonforandroid.build.shprint'), \
75-
mock.patch('pythonforandroid.build.current_directory'), \
76-
mock.patch('pythonforandroid.build.CythonRecipe') as m_CythonRecipe, \
77-
mock.patch('pythonforandroid.build.project_has_setup_py') as m_project_has_setup_py, \
78-
mock.patch('pythonforandroid.build.run_setuppy_install'):
79-
m_project_has_setup_py.return_value = False
80-
81-
# Make sure it is NOT called when `with_debug_symbols` is true:
82-
ctx.with_debug_symbols = True
83-
assert run_pymodules_install(ctx, ctx.archs[0], modules, project_dir) is None
84-
assert m_CythonRecipe().strip_object_files.called is False
85-
86-
# Make sure strip object files IS called when
87-
# `with_debug_symbols` is false:
88-
ctx.with_debug_symbols = False
89-
assert run_pymodules_install(ctx, ctx.archs[0], modules, project_dir) is None
90-
assert m_CythonRecipe().strip_object_files.called is True
91-
9262

9363
class TestTemplates(unittest.TestCase):
9464

0 commit comments

Comments
 (0)