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

Class dependencies are used only on first test #6068

Open
richtja opened this issue Nov 20, 2024 · 0 comments
Open

Class dependencies are used only on first test #6068

richtja opened this issue Nov 20, 2024 · 0 comments

Comments

@richtja
Copy link
Contributor

richtja commented Nov 20, 2024

Describe the bug
If we declare dependencies for test class, avocado will fulfil the dependency only for the first test and others are skipped.

Steps to reproduce

from avocado import Test


class PassTest(Test):
    """
    Example test that passes.

    :avocado: dependency={"type": "package", "name": "hello"}
    """

    def test(self):
        """
        A test simply doesn't have to fail in order to pass
        """
    
    def testi_1(self):
        """
        A test simply doesn't have to fail in order to pass
        """

Expected behavior

$ avocado run examples/tests/passtest_with_dependency.py
JOB ID     : 5277ab385cf56d90fd7c527cb8da66a6e55681da
JOB LOG    : /home/janrichter/avocado/job-results/job-2024-11-20T11.09-5277ab3/job.log
 (2/2) examples/tests/passtest_with_dependency.py:PassTest.testi_1: STARTED
 (2/2) examples/tests/passtest_with_dependency.py:PassTest.testi_1: PASS
 (1/2) examples/tests/passtest_with_dependency.py:PassTest.test: STARTED
 (1/2) examples/tests/passtest_with_dependency.py:PassTest.test: PASS
RESULTS    : PASS 0 | ERROR 0 | FAIL 0 | SKIP 2 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/janrichter/avocado/job-results/job-2024-11-20T11.09-5277ab3/results.html
JOB TIME   : 3.82 s

Current behavior

$ avocado run examples/tests/passtest_with_dependency.py
JOB ID     : 5277ab385cf56d90fd7c527cb8da66a6e55681da
JOB LOG    : /home/janrichter/avocado/job-results/job-2024-11-20T11.09-5277ab3/job.log
 (2/2) examples/tests/passtest_with_dependency.py:PassTest.testi_1: STARTED
 (2/2) examples/tests/passtest_with_dependency.py:PassTest.testi_1: SKIP: Dependency was not fulfilled.
 (1/2) examples/tests/passtest_with_dependency.py:PassTest.test: STARTED
 (1/2) examples/tests/passtest_with_dependency.py:PassTest.test: PASS
RESULTS    : PASS 0 | ERROR 0 | FAIL 0 | SKIP 2 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/janrichter/avocado/job-results/job-2024-11-20T11.09-5277ab3/results.html
JOB TIME   : 3.82 s

@richtja richtja added the bug label Nov 20, 2024
@mr-avocado mr-avocado bot moved this to Triage in Default project Nov 20, 2024
@richtja richtja moved this from Triage to Short Term (Current Q) Backlog in Default project Nov 25, 2024
@richtja richtja added this to the 109 - Codename TBD milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Short Term (Current Q) Backlog
Development

No branches or pull requests

1 participant