Skip to content

Commit

Permalink
Small fixes to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaverga committed Dec 23, 2022
1 parent 6400d4c commit 4b1be00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/scripts/test_ongc.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ def test_search_to_file():
result = runner.invoke(ongc.search, ['--constellation=aql', '--out_file=test.txt'])
assert result.exit_code == 0
assert os.path.isfile('test.txt')
assert '\nNGC6915\n' in open('test.txt').read()
with open('test.txt') as f:
assert '\nNGC6915\n' in f.read()


def test_search_to_custom_file():
Expand All @@ -325,7 +326,8 @@ def test_search_to_custom_file():
])
assert result.exit_code == 0
assert os.path.isfile('test.csv')
assert '\nIC4593;Planetary Nebula;BD +12 2966,HD 145649\n' in open('test.csv').read()
with open('test.csv') as f:
assert '\nIC4593;Planetary Nebula;BD +12 2966,HD 145649\n' in f.read()


def test_search_to_custom_file_invalid_field():
Expand Down

0 comments on commit 4b1be00

Please sign in to comment.