Spaces Data

Minimal test - lines (483, 504)

path: .spaces[3].spaces[17].metrics.mi.mi_visual_studio
old: 52.845312788832
new: 52.40459685123827

path: .spaces[3].spaces[17].metrics.mi.mi_original
old: 90.36548486890273
new: 89.61186061561745

path: .spaces[3].spaces[17].metrics.mi.mi_sei
old: 54.87262461468879
new: 70.00120182339803

path: .spaces[3].spaces[17].metrics.loc.sloc
old: 21.0
new: 22.0

path: .spaces[3].spaces[17].metrics.loc.cloc
old: 0.0
new: 1.0

Code

    def test_xfailure_function(self, testdir):
        testdir.makepyfile(
            """
            import pytest
            def test_xfail():
                pytest.xfail("42")
        """
        )
        result, dom = runandparse(testdir)
        assert not result.ret
        node = dom.find_first_by_tag("testsuite")
        node.assert_attr(skips=1, tests=1)
        tnode = node.find_first_by_tag("testcase")
        tnode.assert_attr(
            file="test_xfailure_function.py",
            line="1",
            classname="test_xfailure_function",
            name="test_xfail",
        )
        fnode = tnode.find_first_by_tag("skipped")
        fnode.assert_attr(message="expected test failure")
        # assert "ValueError" in fnode.toxml()