Test test_local_cff_file_does_not_exist fails
Closed this issue · 1 comments
musicinmybrain commented
$ gh repo clone citation-file-format/cffconvert
$ cd cffconvert
$ python3.12 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .[testing]
(_e) $ python -m pytest
[…]
tests/cli/cff_1_0_3/test_cli.py::test_local_cff_file_does_not_exist FAILED [ 0%]
================================================================================================= FAILURES ==================================================================================================
____________________________________________________________________________________ test_local_cff_file_does_not_exist _____________________________________________________________________________________
@pytest.mark.cli
def test_local_cff_file_does_not_exist():
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(cffconvert, ["-f", "bibtex"])
> assert isinstance(result.exception, FileNotFoundError)
E AssertionError
tests/cli/cff_1_0_3/test_cli.py:18: AssertionError
========================================================================================== short test summary info ==========================================================================================
FAILED tests/cli/cff_1_0_3/test_cli.py::test_local_cff_file_does_not_exist - AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================================== 1 failed, 3 passed in 3.46s ========================================================================================
It looks like the value of result.exception
in this test is None
.
musicinmybrain commented
Oh, I see, this works with the test path given explicitly as
python -m pytest test/
as recommended in
Line 56 in 5295f87
That’s a bit surprising, but easy enough.