-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unittest for pythonforandroid.util
and...
#1855
Conversation
Can you give me the failing tests output? Also it would be really better if you didn't mark them as skip even temporarily, if we ever accidentally merge this that might be a bit of a problem |
tests/test_pythonpackage_basic.py
Outdated
@@ -80,6 +93,11 @@ def test_get_package_name(): | |||
shutil.rmtree(temp_d) | |||
|
|||
|
|||
# Todo: Fix CI tests for python > 3.5 | |||
@pytest.mark.skipif( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't 😱 let me look at the output and I'll see what I can do, these shouldn't be skipped
WIP but already looking good well done 💪 |
Because we make use of some mock methods in module `test_util` (eg: `mock.assert_called_once`) which were introduced in python 3.6, so if the system python of the test system is lower than 3.6, then the tox tests will fail
Verifying the number of calls we made to some functions: - test_folder_exist - test_delete
…ggestions Reviewers suggestions are: - Remove forgotten debug code - `style code` change for `test_current_directory_exception` - add test `mock_shutil_rmtree.assert_not_called()` for `test_temp_directory` Also changed some lines that shouldn't be split (because are pep8 friendly without breaking it in multiple lines)
Aaaa, @Jonast...we still have an error in our tox tests for https://travis-ci.org/kivy/python-for-android/jobs/544152688#L423-L428 Now it's different than before, we only have an error so we almost have it 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work thanks!
@opacam you need to make sure the |
Oh yes, I already saw that, the thing is that python-for-android/.travis.yml Line 18 in d2ff49d
To demonstrate that it is already installed in the travis's tox job, I created another branch from this pr's branch, with an extra commit with a couple of lines, just before the command to trigger tox:
Yo can see that it's already installed in this travis job: https://travis-ci.org/opacam/python-for-android/jobs/544471193#L263-L264 So the |
most likely not for 3.7. the python 3.7 in that travis image is in a really weird directory, the mechanism you used for install might have installed it additionally and not as replacement. so (that could also mean that summed up, the way 3.7 is installed in that travis image is really weird. I'm personally not a fan, I'm not sure why they do it like that. that is also one of the reasons why the function I wrote to find the system python initially broke |
…tage Because we only need those dependencies for our `tox` tests so we may speed up a little the overall CI tests timings. We also remove all the other apt commands performed in `before_install` because we don't need it. Note: in order to successfully pass the test `test_pythonpackage_basic.test_virtualenv`, we need to deactivate the system virtualenv See also: travis-ci/travis-ci#8589
@Jonast 👍, thanks for your help with this issues with Now we have a green tick mark in our tox tests 😄 |
pythonforandroid.util
and...pythonforandroid.util
and...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work and more coverage, thanks 👏
Also:
pythonforandroid.util
test_distribution
verifying the number of calls we made to some functions. @AndreMiras, this is for you, that reviewed the pr where we add those tests and you noticed those missing verifications 👍 (completes the work started at Add unittest for modulepythonforandroid.distribution
#1847)Temporary skip some pythonpackage's tests for python > 3.5 in travis (Because it fails and I don't know why it fails. So this needs further investigation and a fix, @Jonast...could you take a look on this?)test_archs
,test_distribution
andtest_util
Notes:
the pythonpackage tests
before merging thisAs a side note:
The pythonpackage's tests that fails are not failing for the same reason addressed in #1852 (see travis error). It seems that fails onThe pythonpackage tests issues mentioned are addressed at #1856 and #1852_get_system_python_executable
...