opendatacube / odc-tools

ODC features that DEA is experimenting with or prototyping with the intention of being integrated into odc-core in the future

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pytest.mark.xfail doesnt work as expected

pindge opened this issue · comments

______________________ test_s3_to_dc_stac_update_if_exist ______________________
aws_env = None
    @pytest.mark.xFail
    @pytest.mark.depends(on=['add_products'])
    def test_s3_to_dc_stac_update_if_exist(aws_env):
        runner = CliRunner()
        # This will fail if requester pays is enabled
        result = runner.invoke(
            cli,
            [
                "--no-sign-request",
                "--stac",
                "--update-if-exists",
                "s3://sentinel-cogs/sentinel-s2-l2a-cogs/42/T/UM/2022/1/S2A_42TUM_20220102_0_L2A/*.json",
                "s2_l2a",
            ],
        )
>       assert result.exit_code == 0
E       assert 1 == 0
E        +  where 1 = <Result SystemExit(1)>.exit_code
apps/dc_tools/tests/test_s3_to_dc.py:56: AssertionError