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

Save GSGW test output file to example_data #369

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
13 changes: 11 additions & 2 deletions tests/file_io_indexed_gzip_writer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ def setUp(self):
def tearDown(self):
""" """
self.Writer.close()
os.remove(os.path.abspath(os.path.join(".", "tests", "data", "unittest.mzml")))
try:
os.remove(os.path.abspath(os.path.join(".", "tests", "data", "unittest.mzml")))
except FileNotFoundError:
pass
try:
os.remove(os.path.abspath(os.path.join(".", "tests", "data", "unittest2.mzml")))
except FileNotFoundError:
pass

def test_init(self):
self.assertEqual(self.Writer.crc32, 0)
Expand Down Expand Up @@ -128,7 +135,9 @@ def test_add_data(self):
"uncompressed",
"CF_07062012_pH8_2_3A.mzML",
)
self.Writer = GSGW(test_file, max_idx=80, max_idx_len=8, max_offset_len=8)
self.Writer = GSGW(test_file, max_idx=80, max_idx_len=8, max_offset_len=8, output_path=os.path.abspath(
os.path.join(".", "tests", "data", "unittest2.mzml")
))
self.Writer.add_data(test_string, "a")
self.Writer.close()
file = open(self.paths[0], "rb")
Expand Down
Loading