Skip to content

Conversation

@KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Sep 23, 2024

Part of #1023 . It looks like... the amount of change (including test fixes) will gain, so let me split PRs.

  • I have removed some tests/files in functional directory and add/update these unit test because they test the same thing as this python client. This python client doesn't need to test the driver's functionality since driver functions are already tested in each driver's tests.
  • I have fixed unit tests since they didn't test as wrong syntax.
  • I also updated the commit hook versions to up to date to current config.

Comment on lines 24 to 25
def set_capability(self: T, name: str, value: Any) -> T:
...
Copy link
Member Author

@KazuCocoa KazuCocoa Sep 23, 2024

Choose a reason for hiding this comment

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

@KazuCocoa
Copy link
Member Author

Hm, maybe we should update the commit hook config. Moving to draft for now.
https://github.com/appium/python-client/actions/runs/10986974950/job/30501131986?pr=1024

@KazuCocoa KazuCocoa marked this pull request as draft September 23, 2024 03:07
@KazuCocoa KazuCocoa marked this pull request as ready for review September 23, 2024 16:41
@KazuCocoa KazuCocoa changed the title test: Cleanup redundant functional tests to reduce the flakiness test: cleanup functional tests and move to unit test to CI stable Sep 24, 2024
httpretty.register_uri(httpretty.POST, appium_command('/session/1234567890/execute/sync'), body='{"value": ""}')
result = driver.install_app('path/to/app')

assert {'app': 'path/to/app'}, get_httpretty_request_body(httpretty.last_request())
Copy link
Member Author

Choose a reason for hiding this comment

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

Like this test's assertion was wrong. I'm fixing this kind of error as well as part of https://github.com/appium/python-client/issues


driver.switch_to.context('NATIVE_APP')

assert {'name': 'NATIVE_APP'}, get_httpretty_request_body(httpretty.last_request())
Copy link
Contributor

Choose a reason for hiding this comment

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

assertion is wrong. I think you missed ==


driver.switch_to.context(None)

assert {'name': None}, get_httpretty_request_body(httpretty.last_request())
Copy link
Contributor

Choose a reason for hiding this comment

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

@KazuCocoa KazuCocoa merged commit 9cdfe5c into master Sep 24, 2024
18 checks passed
@KazuCocoa KazuCocoa deleted the tests-cleanup branch September 24, 2024 06:50
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.

4 participants