Skip to content

test_welltest_dpds errors in komodo bleeding #470

@berland

Description

@berland

Due to breaking changes in pytest 7.0.0,

tmp_path = PosixPath('/tmp/pytest-of-f_scout_ci/pytest-1503/test_to_csv0')

    def test_to_csv(tmp_path):
        """Test to_csv"""
    
        os.chdir(tmp_path)
    
        vec = np.array([0, 0.5, 1, 2])
        welltest_dpds.to_csv("mock.csv", [vec])
        assert Path("mock.csv").exists()
        lines = Path("mock.csv").read_text(encoding="utf8").splitlines()
        assert len(lines) == 4
    
        welltest_dpds.to_csv("mock.csv", [vec], ["vec"])
        assert Path("mock.csv").exists()
        lines = Path("mock.csv").read_text(encoding="utf8").splitlines()
        assert len(lines) == 5
    
        vecb = np.array([1, 0.5, 3, 100])
        welltest_dpds.to_csv("mock.csv", [vec, vecb], ["vec", "vecb"])
        assert Path("mock.csv").exists()
        lines = Path("mock.csv").read_text(encoding="utf8").splitlines()
        assert len(lines) == 5
    
        dframe = pd.read_csv("mock.csv", skipinitialspace=True)
        assert dframe["vec"].size == 4
>       assert pytest.approx(dframe["vecb"].iloc[-1] == 100)
E       AssertionError: approx() is not supported in a boolean context.
E       Did you mean: `assert a == approx(b)`?

/tmp/jenkins-komodo-f_scout_ci/workspace/unit-tests/subscript/test-root/tests/test_welltest_dpds.py:268: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions