Skip to content

Status of test suite is not updated when all tests pass (parametric tests) #4727

Closed

Description

Create test as follows:
tests/test_one.py

import unittest


class TestOne(unittest.TestCase):
    def test_dividing(self):
        self.assertEqual(4/2, 2)

    def test_dividing2(self):
        self.assertEqual(4/2, 2)

    def test_dividing21(self):
        self.assertEqual(4/2, 2)

Run all tests, the status of the suite is still unknown
Screen Shot 2019-03-12 at 12 01 47 PM

Activity

  1. DonJayamanne commented on Mar 12, 2019

    @DonJayamanne
    Author

    Tooltips are wrong.

    tests

  2. DonJayamanne commented on Mar 13, 2019

    @DonJayamanne
    Author

    Kartik Raj (@karrtikr)
    Please merge latest master, and it doesn't work with parameterized tests:
    Here's some sample python code for parameterized tests.

    testdata = [
        (datetime(2001, 12, 12), datetime(2001, 12, 11), timedelta(1)),
        (datetime(2001, 12, 11), datetime(2001, 12, 12), timedelta(-1)),
    ]
    
    
    @pytest.mark.parametrize("a,b,expected", testdata)
    def test_timedistance_v0Hmm(a, b, expected):
        # import time
        time.sleep(1)
        diff = a - b
        assert diff == expected

    Screen Shot 2019-03-13 at 12 33 58 PM

  3. changed the title [-]Status of test suite is not updated when all tests pass[/-] [+]Status of test suite is not updated when all tests pass (parametric tests)[/+] on Mar 14, 2019
  4. locked as resolved and limited conversation to collaborators on Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions