Skip to content
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

test #23

Open
wants to merge 111 commits into
base: codecov
Choose a base branch
from
Open

test #23

wants to merge 111 commits into from

Conversation

richtja
Copy link
Owner

@richtja richtja commented Oct 9, 2024

No description provided.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (codecov@17201f1). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             codecov      #23   +/-   ##
==========================================
  Coverage           ?   54.47%           
==========================================
  Files              ?      202           
  Lines              ?    21874           
  Branches           ?        0           
==========================================
  Hits               ?    11916           
  Misses             ?     9958           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

FarooqAbdulla02 and others added 26 commits October 14, 2024 17:40
when IP addresses are confiugred from a config file, the generic
"ip flush" command does not removes the IP address and IP's will
be remain intact.

when user wanted to remove all IP addresses of interface which user
doesnot aware of it, this code will helps to find all the assigned
IP addresses and removes it.

Signed-off-by: Shaik Abdulla <[email protected]>
Github is depracating the MacOS 12 runner and it will be removed
December 3rd. Let's do the update now to avoid any future trubles.

Reference: actions/runner-images#10721
Signed-off-by: Jan Richter <[email protected]>
…sh_ipaddr

Remove IPv4 Addresses of network interface.
For the sake of incorporating a fix on check-lint, where the return
code signals any failures in the executed checks, as opposed to just
the last check.

Signed-off-by: Cleber Rosa <[email protected]>
In order to have "avocado/utils" in a way that can be easily
transported to the autils project, it's necessary to have the closest
lint configuration possible (ideally, the same).

This introduces a configuration file that is a copy of the existing
".pylintrc" file.  The goal is that further commits will address other
warnings and bring the exceptions as close as possible to the
"avocado-static-checks" default pylint configuration file, which has
no exceptions.

Signed-off-by: Cleber Rosa <[email protected]>
For this change, there was the possibility of making changes
compatible with "logging-format-style=old" (the default), or jumping
the gun and making changes compatible with "logging-format-style=new".
The earlier approach was chosen because the goal is to get closer to:

* A default pylint configuration (as shipped/generated by pylint
  itself)
* The configuration provided by avocado-static-checks and used by
  autils

Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/logging-fstring-interpolation.html
Signed-off-by: Cleber Rosa <[email protected]>
The "broad-except" has been renamed to "broad-exception-caught",
warning number W0718.  So it can be removed from the configuration
file.

Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/broad-except.html
Signed-off-by: Cleber Rosa <[email protected]>
There are a few occurrences where code is being used to keep track of
possible improvements.  Many times these will go unnoticed for ages.

Let's either document the limitations that are affected by the
"TODO"s, or remove them because after quite some time, they were not
something that was attempted to be improved or fixed.

https://pylint.pycqa.org/en/latest/user_guide/messages/warning/fixme.html
Signed-off-by: Cleber Rosa <[email protected]>
…s_lint_warnings

Avocado utils lint warnings
Since codeclimate check hasn't been accurate and often creates false
positive, the positives of having such tool is much lower that the
negative impact on PRs. Therefore, this commit removes all occurrences
of codeclimate code from Avocado.

Signed-off-by: Jan Richter <[email protected]>
…nding

lint: fix one outstanding raise-missing-from / W0707
The current mock method on the two tests modified here do not support
the context manager pattern.  Let's use the standard library support
for mocking open that supports it.

This is needed for future lint check improvements that will enforce
the use of open() as a context manager to avoid leaking resources.

The test_set_idle_state_withsetstate() test has a significant change
of behavior: one io.BytesIO instance was used for the writes that, in
real life, would happen on two different files.  The proposed change
brings a more realistic, with a single write to a single
file (although it only checks half of the values now).  Still, I
believe this is an improvement, including the extra check for the file
that was actually written to.

Reference: https://docs.python.org/3/library/unittest.mock.html#mock-open
Signed-off-by: Cleber Rosa <[email protected]>
…ils_cpu_context_manager

selftests/unit/utils/cpu.py: support the context manager pattern
- Removed the unused variable `hint_resolutions` from the `resolve` function.
- Directly used the dictionary comprehension to populate `hint_references` from `hint.get_resolutions()`.
- Simplified the logic by eliminating an unnecessary intermediate variable.

Signed-off-by: lixu <[email protected]>
Update check_test docstring to clarify state parameter
Remove unused variable 'hint_resolutions'
The message given by the avocado-instrumented and python-unittest
resolvers, resolvers that share a lot of code and require Python
files, can be made clearer.

One of the earliest checks performed is about the file *name* and
its *suffix*, and not necessarily about an actual file (that exists).
Even though the concepts are pretty close, let's make it clear that
these resolvers are rejecting the references given based on the ".py"
suffix not existing in the file name, and not necessarily, at that
time, rejecting it based on an actual existing file.

Signed-off-by: Cleber Rosa <[email protected]>
This patch will make the links on the UI of the [Deployments](https://github.com/avocado-framework/avocado/deployments/pypi) and workflow pages more accurate.

Signed-Off-By: Sviatoslav Sydorenko <[email protected]>
@richtja richtja force-pushed the test branch 6 times, most recently from 2dce3f4 to 21f01b0 Compare February 6, 2025 12:36
To keep the API stability let's dissable it for current API, but enforce
it in the future.

Signed-off-by: Jan Richter <[email protected]>
To keep the API stability let's dissable it for current API, but
enforce it in the future.

Signed-off-by: Jan Richter <[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.

9 participants