Skip to content

chore: Fix int - str comparison error in ios desired capabilities #517

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

Merged

Conversation

Akulavenkatesh
Copy link
Contributor

For #373

Changes

  1. Fix for below error in ios desired_capabilities, which occurred when trying to run ios functional tests in parallel
if number >= PytestXdistWorker.COUNT:
TypeError: '>=' not supported between instances of 'int' and 'str'
  1. Updated test case folder path and iPhone model in Readme file

Results

(appium-dev) akvenk:search_context akvenk$ pytest -n 2 find_by_ios_class_chain_tests.py 
bringing up nodes...
..                                                                                                                                                                                                                              [100%]Coverage.py warning: Module appium was never imported. (module-not-imported)
Coverage.py warning: No data was collected. (no-data-collected)


---------- coverage: platform darwin, python 3.7.3-final-0 -----------
Name                                                                                                                        Stmts   Miss  Cover
-----------------------------------------------------------------------------------------------------------------------------------------------
/Users/akvenk/Documents/github/appium-dev/python-client/appium/__init__.py                                                      6      1    83%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/common/__init__.py                                               1      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/common/exceptions.py                                             3      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/common/helper.py                                                11      5    55%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/common/logger.py                                                 9      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/saucetestcase.py                                                30     25    17%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/version.py                                                       1      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/__init__.py                                            3      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/appium_connection.py                                  11      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/appium_service.py                                    131    131     0%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/applicationstate.py                                    6      6     0%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/clipboard_content_type.py                              4      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/common/__init__.py                                     1      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/common/mobileby.py                                    13      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/common/multi_action.py                                23     16    30%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/common/touch_action.py                                54     40    26%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/connectiontype.py                                      7      7     0%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/errorhandler.py                                       11      4    64%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/__init__.py                                 0      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/action_helpers.py                          46     37    20%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/__init__.py                         0      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/activities.py                      24     13    46%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/common.py                          15      5    67%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/display.py                          7      1    86%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/gsm.py                             46     15    67%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/nativekey.py                      295    295     0%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/network.py                         34     10    71%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/performance.py                     13      5    62%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/power.py                           13      4    69%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/sms.py                              8      2    75%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/android/system_bars.py                      7      1    86%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/applications.py                            62     36    42%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/clipboard.py                               21      8    62%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/context.py                                 13      3    77%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/device_time.py                             12      4    67%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/execute_driver.py                          15      9    40%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/execute_mobile_command.py                   8      4    50%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/hw_actions.py                              33     15    55%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/images_comparison.py                       14      6    57%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/ime.py                                     22      8    64%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/keyboard.py                                44     30    32%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/location.py                                18      8    56%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/log_event.py                               15      7    53%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/remote_fs.py                               29     17    41%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/screen_record.py                           16      8    50%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/__init__.py                  9      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/android.py                  24     12    50%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/base_search_context.py       5      2    60%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/custom.py                    7      2    71%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/ios.py                      15      5    67%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/mobile.py                   16      8    50%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/search_context/windows.py                   7      2    71%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/session.py                                 18      8    56%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/extensions/settings.py                                12      4    67%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/mobilecommand.py                                      77      0   100%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/switch_to.py                                           5      1    80%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/webdriver.py                                         146     38    74%
/Users/akvenk/Documents/github/appium-dev/python-client/appium/webdriver/webelement.py                                         44     18    59%
-----------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                                        1540    886    42%

2 passed in 20.36 seconds

…al tests in parallel

if number >= PytestXdistWorker.COUNT:

TypeError: '>=' not supported between instances of 'int' and 'str'

2. Updated test case path and iPhone model in Readme file
@jsf-clabot
Copy link

jsf-clabot commented Apr 12, 2020

CLA assistant check
All committers have signed the CLA.

@Akulavenkatesh Akulavenkatesh changed the title 1. Fix for below error, which occured when trying to run ios function… Fix int - str comparison error in ios desired capabilities Apr 12, 2020
@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Apr 12, 2020

Please fix the commit header to align it with semantic PRs rules.

@ki4070ma are the failing CI tests just flaky?

@Akulavenkatesh Akulavenkatesh changed the title Fix int - str comparison error in ios desired capabilities chore: Fix int - str comparison error in ios desired capabilities Apr 13, 2020
@ki4070ma
Copy link
Collaborator

ki4070ma commented Apr 13, 2020

@mykola-mokhnach

are the failing CI tests just flaky?

Yes, so don't need to take care of those fails.

https://dev.azure.com/ki4070ma/python-client/_build/results?buildId=1321&view=ms.vss-test-web.build-test-results-tab

@KazuCocoa KazuCocoa merged commit 9e1959c into appium:master Apr 19, 2020
ki4070ma added a commit that referenced this pull request Apr 26, 2020
* Update pytest-cov requirement from ~=2.6 to ~=2.8 (#489)

Updates the requirements on [pytest-cov](https://github.com/pytest-dev/pytest-cov) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-cov@v2.6.0...v2.8.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Update autopep8 requirement from ~=1.4 to ~=1.5 (#490)

Updates the requirements on [autopep8](https://github.com/hhatto/autopep8) to permit the latest version.
- [Release notes](https://github.com/hhatto/autopep8/releases)
- [Commits](hhatto/autopep8@v1.4...v1.5)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Update tox-travis requirement from ~=0.11 to ~=0.12 (#491)

Updates the requirements on [tox-travis](https://github.com/tox-dev/tox-travis) to permit the latest version.
- [Release notes](https://github.com/tox-dev/tox-travis/releases)
- [Changelog](https://github.com/tox-dev/tox-travis/blob/master/HISTORY.rst)
- [Commits](tox-dev/tox-travis@0.11...0.12)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Update tox requirement from ~=3.6 to ~=3.14 (#494)

Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](tox-dev/tox@3.6.0...3.14.3)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* chore: Fix find_by_images_tests.py (#495)

* chore: Fix find_by_images_tests.py

* Add installation opencv4nodejs

* Fix typo

* Add taking screen record to find_by_image_test

* Fix errors on the emulator

* Remove unused imports

* feat: Add viewmatcher (#480)

* Add android view matcher as strategy locator

* Add docstring

* Add functional test

* Remove find_elements_by_android_data_matcher

* Fix docstring

* tweak docstring

* Bump 0.50

* Update changelog for 0.50

* Fix flaky functional tests (#473)

* Run all tests

* Fix apk file path

* Skip find_element_by_image test cases

* Skip context switching test

* Skip multi tap test on CI

* Change strategy for waiting element

* Add functions for same steps

* Restore unexpected changes

* Fix touch_action_tests

* Fix

* Fix
Fix test_driver_swipe

* fix

* Create _move_to_[target_view]

* [test_driver_swipe] Add wait

* feat: Add idempotency key header to create session requests (#514)

* feat: Override send_keys without file upload function (#515)

* add send_keys_direct

* override send_keys

* tune

* add unittest instead of functional test

* tweak syntax

* Bump 0.51

* Update changelog for 0.51

* test: Fix test_clear flaky functional test (#519)

* test: Add unit test for set_value (setImmediateValue) (#518)

* chore: Fix int - str comparison error in ios desired capabilities (#517)

if number >= PytestXdistWorker.COUNT:

TypeError: '>=' not supported between instances of 'int' and 'str'

2. Updated test case path and iPhone model in Readme file

* fix: Handling of dictionary-values in WebElement.get_attribute() (#521)

* Bump 0.52

* Update changelog for 0.52

* Fix mypy error

* tweak

* Add wait to test

* Skip tap_twice test

* review comments

* Remove unnecessary import

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Kazuaki Matsuo <[email protected]>
Co-authored-by: Mykola Mokhnach <[email protected]>
Co-authored-by: Nrupesh Patel <[email protected]>
Co-authored-by: Venkatesh <[email protected]>
Co-authored-by: Hannes Hauer <[email protected]>
ki4070ma added a commit that referenced this pull request Apr 30, 2020
* Drop py2 support (#478)

* Drop py2 support

* Support 3.7+

* Add explicit type declarations (#482)

* Fixed mypy warning: touch_action.py

* Fixed mypy warning: multi_action.py

* Fixed mypy warning: extensions/android

* Fixed mypy warning: extensions/search_context

* Updated

* Revert some changes to run unit test

* Review comments

* Updates

* Updates

* Add mypy check to ci.sh

* Add mypy to Pipfile

* Updates

* Update README

* Revert unexpected changes

* Updates Dict

* Revert unexpected changes

* Updates

* Review comments

* Review comments

* tweak

* Restore and modify changes

* Fix wrong return type

* Add comments

* Revert unexpected changes

* Fix mypy error

* updates

* Add mypy to pre-commit (#485)

* chore: Applied some py3 formats (#486)

* Removed unused import

* Removed unnecessary codes

* Applied f'' format instead ''.format()

* Fixes

* tweak

* chore: Fix mypy errors under test folder (#487)

* Fix mypy errors under test folder

* Add mypy check for test folder to pre-commit

* Add mypy check to ci

* chore: Remove unittest dependency (#488)

* Removed unnecessary codes from calling super

* Removed unittest dependency

* Upgrade the dependencies to the latest

* Removed unused args

* Review comments

* Update mock requirement from ~=3.0 to ~=4.0 (#502)

Updates the requirements on [mock](https://github.com/testing-cabal/mock) to permit the latest version.
- [Release notes](https://github.com/testing-cabal/mock/releases)
- [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst)
- [Commits](testing-cabal/mock@3.0.0...4.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Add 'from' to except (#503)

* Update pre-commit requirement from ~=1.21 to ~=2.1 (#506)

Updates the requirements on [pre-commit](https://github.com/pre-commit/pre-commit) to permit the latest version.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md)
- [Commits](pre-commit/pre-commit@v1.21.0...v2.1.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* doc: Add script to generate sphinx doc  (#508)

* Add quickstart template files

* Update conf file

* Update

* Update settings

* Change project name

* Add script to generate docs

* Changed header title

* Add new line to usage section

* Add py.typed file(PEP561)

* Replace \n with new line

* tweak

* Use sphinx format for tables

* Rebase python3 branch with master (#522)

* Update pytest-cov requirement from ~=2.6 to ~=2.8 (#489)

Updates the requirements on [pytest-cov](https://github.com/pytest-dev/pytest-cov) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-cov@v2.6.0...v2.8.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Update autopep8 requirement from ~=1.4 to ~=1.5 (#490)

Updates the requirements on [autopep8](https://github.com/hhatto/autopep8) to permit the latest version.
- [Release notes](https://github.com/hhatto/autopep8/releases)
- [Commits](hhatto/autopep8@v1.4...v1.5)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Update tox-travis requirement from ~=0.11 to ~=0.12 (#491)

Updates the requirements on [tox-travis](https://github.com/tox-dev/tox-travis) to permit the latest version.
- [Release notes](https://github.com/tox-dev/tox-travis/releases)
- [Changelog](https://github.com/tox-dev/tox-travis/blob/master/HISTORY.rst)
- [Commits](tox-dev/tox-travis@0.11...0.12)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Update tox requirement from ~=3.6 to ~=3.14 (#494)

Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](tox-dev/tox@3.6.0...3.14.3)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* chore: Fix find_by_images_tests.py (#495)

* chore: Fix find_by_images_tests.py

* Add installation opencv4nodejs

* Fix typo

* Add taking screen record to find_by_image_test

* Fix errors on the emulator

* Remove unused imports

* feat: Add viewmatcher (#480)

* Add android view matcher as strategy locator

* Add docstring

* Add functional test

* Remove find_elements_by_android_data_matcher

* Fix docstring

* tweak docstring

* Bump 0.50

* Update changelog for 0.50

* Fix flaky functional tests (#473)

* Run all tests

* Fix apk file path

* Skip find_element_by_image test cases

* Skip context switching test

* Skip multi tap test on CI

* Change strategy for waiting element

* Add functions for same steps

* Restore unexpected changes

* Fix touch_action_tests

* Fix

* Fix
Fix test_driver_swipe

* fix

* Create _move_to_[target_view]

* [test_driver_swipe] Add wait

* feat: Add idempotency key header to create session requests (#514)

* feat: Override send_keys without file upload function (#515)

* add send_keys_direct

* override send_keys

* tune

* add unittest instead of functional test

* tweak syntax

* Bump 0.51

* Update changelog for 0.51

* test: Fix test_clear flaky functional test (#519)

* test: Add unit test for set_value (setImmediateValue) (#518)

* chore: Fix int - str comparison error in ios desired capabilities (#517)

if number >= PytestXdistWorker.COUNT:

TypeError: '>=' not supported between instances of 'int' and 'str'

2. Updated test case path and iPhone model in Readme file

* fix: Handling of dictionary-values in WebElement.get_attribute() (#521)

* Bump 0.52

* Update changelog for 0.52

* Fix mypy error

* tweak

* Add wait to test

* Skip tap_twice test

* review comments

* Remove unnecessary import

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Kazuaki Matsuo <[email protected]>
Co-authored-by: Mykola Mokhnach <[email protected]>
Co-authored-by: Nrupesh Patel <[email protected]>
Co-authored-by: Venkatesh <[email protected]>
Co-authored-by: Hannes Hauer <[email protected]>

* chore: Update readme and gitchangelog section role (#524) (#525)

* chore: tweak changelog filter

* address stoping Python 2 support

* 2 instead of 2.0...

* tweak readme

* Revert some unexpected changes

* review comments

* Changed bound for TypeVar

* Fix crashing ci

* Remove beta

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Kazuaki Matsuo <[email protected]>
Co-authored-by: Mykola Mokhnach <[email protected]>
Co-authored-by: Nrupesh Patel <[email protected]>
Co-authored-by: Venkatesh <[email protected]>
Co-authored-by: Hannes Hauer <[email protected]>
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.

5 participants