forked from kivy/python-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_build.py
More file actions
20 lines (16 loc) · 705 Bytes
/
test_build.py
File metadata and controls
20 lines (16 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import unittest
from unittest import mock
from pythonforandroid.build import run_pymodules_install
class TestBuildBasic(unittest.TestCase):
def test_run_pymodules_install_optional_project_dir(self):
"""
Makes sure the `run_pymodules_install()` doesn't crash when the
`project_dir` optional parameter is None, refs #1898
"""
ctx = mock.Mock()
modules = []
project_dir = None
with mock.patch('pythonforandroid.build.info') as m_info:
assert run_pymodules_install(ctx, modules, project_dir) is None
assert m_info.call_args_list[-1] == mock.call(
'No Python modules and no setup.py to process, skipping')