Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test to run on Windows #159

Merged
merged 1 commit into from
Mar 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion kadi/commands/tests/test_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ def test_cmd_line_interface(tmpdir):
'--state-keys', 'obsid,si_mode,pcad_mode'])
with open(filename, 'r') as fh:
out = fh.read()
assert out.splitlines() == [

# Work around bug in astropy 3.0 where text table output has `\r\r\n` line endings
# due to putting os.linesep \r\n at the end of each line in universal newline mode,
# at which point python turns the \n into \r\n.
lines = [line for line in out.splitlines() if line.strip()]
assert lines == [
' datestart datestop obsid si_mode pcad_mode ',
' 2017:001:21:00:00.000 2017:001:21:02:06.467 18140 TE_008FC NPNT ',
' 2017:001:21:02:06.467 2017:001:21:05:06.467 18140 TE_008FC NMAN ',
Expand Down