Skip to content

Fixes service only unittest loading#2181

Merged
AndreMiras merged 1 commit intokivy:developfrom
AndreMiras:feature/service_only_unittest_loading
May 9, 2020
Merged

Fixes service only unittest loading#2181
AndreMiras merged 1 commit intokivy:developfrom
AndreMiras:feature/service_only_unittest_loading

Conversation

@AndreMiras
Copy link
Member

See adb logcat trace after the fix:

Android kivy bootstrap done. __name__ is __main__
AND: Ran string
Run user program, change dir and execute entrypoint
Imported unittest
App requirements are:  {'sqlite3', 'python3', 'openssl', 'requests', 'pyjnius', 'libffi'}
Defined test case
Adding Testcase:  tests.test_requirements.Sqlite3TestCase
Adding Testcase:  tests.test_requirements.OpensslTestCase
Adding Testcase:  tests.test_requirements.RequestsTestCase
Adding Testcase:  tests.test_requirements.PyjniusTestCase
Adding Testcase:  tests.test_requirements.LibffiTestCase
Tests to perform are:  {'sqlite3': 'tests.test_requirements.Sqlite3TestCase', 'openssl': 'tests.test_requirements.OpensslTestCase', 'requests': 'tests.test_requirements.RequestsTestCase', 'pyjnius': 'tests.test_requirements.PyjniusTestCase', 'libffi': 'tests.test_requirements.LibffiTestCase'}
..........
----------------------------------------------------------------------
Ran 10 tests in 4.130s

OK
Python for android ended.

See adb logcat trace after the fix:
```
Android kivy bootstrap done. __name__ is __main__
AND: Ran string
Run user program, change dir and execute entrypoint
Imported unittest
App requirements are:  {'sqlite3', 'python3', 'openssl', 'requests', 'pyjnius', 'libffi'}
Defined test case
Adding Testcase:  tests.test_requirements.Sqlite3TestCase
Adding Testcase:  tests.test_requirements.OpensslTestCase
Adding Testcase:  tests.test_requirements.RequestsTestCase
Adding Testcase:  tests.test_requirements.PyjniusTestCase
Adding Testcase:  tests.test_requirements.LibffiTestCase
Tests to perform are:  {'sqlite3': 'tests.test_requirements.Sqlite3TestCase', 'openssl': 'tests.test_requirements.OpensslTestCase', 'requests': 'tests.test_requirements.RequestsTestCase', 'pyjnius': 'tests.test_requirements.PyjniusTestCase', 'libffi': 'tests.test_requirements.LibffiTestCase'}
..........
----------------------------------------------------------------------
Ran 10 tests in 4.130s

OK
Python for android ended.
```
@AndreMiras
Copy link
Member Author

The app was tested build without kivy or flask requirements so the service unit test would be ran:

python setup.py apk --ndk-dir ~/.buildozer/android/platform/android-ndk-r19c/ --sdk-dir ~/.buildozer/android/platform/android-sdk/ --arch=armeabi-v7a --debug --requirements sqlite3,libffi,openssl,pyjnius,python3,requests

@AndreMiras AndreMiras requested a review from opacam May 9, 2020 13:58
Copy link
Member

@opacam opacam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Thanks!!

@AndreMiras AndreMiras merged commit f29262a into kivy:develop May 9, 2020
@AndreMiras AndreMiras deleted the feature/service_only_unittest_loading branch May 9, 2020 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants