Skip to content

Commit

Permalink
Fixes service only unittest loading
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
AndreMiras committed May 9, 2020
1 parent f96356b commit c0d3015
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testapps/on_device_unit_tests/test_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@
else:
# we don't have kivy or flask in our
# requirements, so we run unittests in terminal
suite = unittest.TestLoader().loadTestsFromNames(list(tests_to_perform))
suite = unittest.TestLoader().loadTestsFromNames(list(tests_to_perform.values()))
unittest.TextTestRunner().run(suite)

0 comments on commit c0d3015

Please sign in to comment.