Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[skip-changelog] Migrate tests from test_completion.py to completion_test.go #1844

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
MatteoPologruto merged 13 commits into master from completion-test-go
Sep 2, 2022

Conversation

Copy link
Contributor

@MatteoPologruto MatteoPologruto commented Aug 22, 2022
edited
Loading

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Infrastructure enhancement

What is the new behavior?

This PR is a followup to PR #1806
Integration tests that were previously present in test_completion.py have been rewritten in completion_test.go, without changing their original purpose.
The tests are the following:

  • TestCompletionNoArgs
  • TestCompletionBash
  • TestCompletionZsh
  • TestCompletionFish
  • TestCompletionPowershell
  • TestCompletionBashNoDesc
  • TestCompletionZshNoDesc
  • TestCompletionFishNoDesc
  • TestCompletionPowershellNoDesc
  • TestStaticCompletions
  • TestConfigCompletion
  • TestLibCompletion
  • TestCoreCompletion

I could not find a way to correctly implement the hide=true flag present in the first half of the commands of the original TestLibCompletion, so I omitted it while rewriting them. For example:

result = run_command(["__complete", "lib", "install", ""], hide=True)

has simply been rewritten as

stdout, _, _ := cli.Run("__complete", "lib", "install", "")

If you have any suggestions, I will modify the corresponding commit.

Does this PR introduce a breaking change, and is
titled accordingly?

No


See how to contribute

@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Aug 22, 2022
Copy link

codecov bot commented Aug 22, 2022
edited
Loading

Codecov Report

Merging #1844 (9c4422b) into master (aa41d72) will increase coverage by 0.01%.
The diff coverage is n/a.

@@ Coverage Diff @@
## master #1844 +/- ##
==========================================
+ Coverage 36.37% 36.39% +0.01% 
==========================================
 Files 231 231 
 Lines 19572 19572 
==========================================
+ Hits 7120 7123 +3 
+ Misses 11622 11620 -2 
+ Partials 830 829 -1 
Flag Coverage Δ
unit 36.39% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
arduino/cores/packagemanager/package_manager.go 66.58% <0.00%> (+0.75%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@MatteoPologruto MatteoPologruto marked this pull request as ready for review August 22, 2022 09:48
@MatteoPologruto MatteoPologruto changed the title (削除) [skip-changelog] Migrate test from test_completion.py to completion_test.go (削除ここまで) (追記) [skip-changelog] Migrate tests from test_completion.py to completion_test.go (追記ここまで) Aug 24, 2022
Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

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

Nice work!
The hide=True is not a problem. It was used only to hide some output from the terminal when the test is run.

@MatteoPologruto MatteoPologruto deleted the completion-test-go branch September 2, 2022 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@cmaglie cmaglie Awaiting requested review from cmaglie

1 more reviewer

@umbynos umbynos umbynos approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /