Skip to content

Commit cabe6a5

Browse files
committed
remove unnecessary test
1 parent 8629260 commit cabe6a5

File tree

2 files changed

+1
-58
lines changed

2 files changed

+1
-58
lines changed

pythonforandroid/recipes/python3/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def add_flags(include_flags, link_dirs, link_libs):
262262
info('Activating flags for sqlite3')
263263
recipe = Recipe.get_recipe('sqlite3', self.ctx)
264264
add_flags(' -I' + recipe.get_build_dir(arch.arch),
265-
' -L' + recipe.get_lib_dir(arch), ' -lsqlite3')
265+
' -L' + recipe.get_build_dir(arch.arch), ' -lsqlite3')
266266

267267
info('Activating flags for libffi')
268268
recipe = Recipe.get_recipe('libffi', self.ctx)
@@ -388,7 +388,6 @@ def create_python_bundle(self, dirn, arch):
388388
copying all the modules and standard library to the right
389389
place.
390390
"""
391-
# Todo: find a better way to find the build libs folder
392391
modules_build_dir = glob.glob(join(
393392
self.get_build_dir(arch.arch),
394393
'android-build',

tests/recipes/test_python3.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -143,59 +143,3 @@ def test_build_arch_wrong_ndk_api(self):
143143
# restore recipe's ctx or we could get failures with other test,
144144
# since we share `self.recipe with all the tests of the class
145145
self.recipe.ctx.ndk_api = self.ctx.ndk_api
146-
147-
@mock.patch('shutil.copystat')
148-
@mock.patch('shutil.copyfile')
149-
@mock.patch("pythonforandroid.util.chdir")
150-
@mock.patch("pythonforandroid.util.makedirs")
151-
@mock.patch("pythonforandroid.util.walk")
152-
@mock.patch("pythonforandroid.recipes.python3.sh.find")
153-
@mock.patch("pythonforandroid.recipes.python3.sh.cp")
154-
@mock.patch("pythonforandroid.recipes.python3.sh.zip")
155-
@mock.patch("pythonforandroid.recipes.python3.subprocess.call")
156-
def test_create_python_bundle(
157-
self,
158-
mock_subprocess,
159-
mock_sh_zip,
160-
mock_sh_cp,
161-
mock_sh_find,
162-
mock_walk,
163-
mock_makedirs,
164-
mock_chdir,
165-
mock_copyfile,
166-
mock_copystat,
167-
):
168-
fake_compile_dir = '/fake/compile/dir'
169-
simulated_walk_result = [
170-
["/fake_dir", ["__pycache__", "Lib"], ["README", "setup.py"]],
171-
["/fake_dir/Lib", ["ctypes"], ["abc.pyc", "abc.py"]],
172-
["/fake_dir/Lib/ctypes", [], ["util.pyc", "util.py"]],
173-
]
174-
mock_walk.return_value = simulated_walk_result
175-
self.recipe.create_python_bundle(fake_compile_dir, self.arch)
176-
177-
recipe_build_dir = self.recipe.get_build_dir(self.arch.arch)
178-
modules_build_dir = glob.glob(join(
179-
recipe_build_dir,
180-
'android-build',
181-
'build',
182-
'lib.*'
183-
))[0]
184-
expected_sp_paths = [
185-
modules_build_dir,
186-
join(recipe_build_dir, 'Lib'),
187-
self.ctx.get_python_install_dir(self.arch.arch),
188-
]
189-
for n, (sp_call, kw) in enumerate(mock_subprocess.call_args_list):
190-
self.assertEqual(sp_call[0][-1], expected_sp_paths[n])
191-
192-
# we expect two calls to `walk_valid_filens`
193-
self.assertEqual(len(mock_walk.call_args_list), 2)
194-
195-
mock_sh_zip.assert_called()
196-
mock_sh_cp.assert_called()
197-
mock_sh_find.assert_called()
198-
mock_makedirs.assert_called()
199-
mock_chdir.assert_called()
200-
mock_copyfile.assert_called()
201-
mock_copystat.assert_called()

0 commit comments

Comments
 (0)