sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Failing tests on Windows #148

Closed taldcroft closed 2 years ago

taldcroft commented 4 years ago

There are a couple of failing tests on Windows, neither is critical. First is due to apparent blank lines between each output line in the command line interface test_cmd_line_interface(tmpdir). Probably related to \n\r vs \n?

Second is trivial:

    def test_get_continuity_fail():
        with pytest.raises(ValueError) as err:
            states.get_continuity('2017:014', 'letg', lookbacks=[3])
>       assert 'did not find transitions' in str(err)
E       AssertionError: assert 'did not find transitions' in '<ExceptionInfo ValueError tblen=2>'
E        +  where '<ExceptionInfo ValueError tblen=2>' = str(<ExceptionInfo ValueError tblen=2>)

The test should be str(err.value) not str(err). In more modern pytest the right way to write this is:

with pytest.raises(ValueError, match='did not find transitions'):
taldcroft commented 2 years ago

Passing tests on Windows now.