def test_write_read_new_style(self, default, tmpdir): with open(tmpdir.join('new_style.txt'), 'w') as f: default.to_ASCII(f, new_style=True) with open(tmpdir.join('new_style.txt')) as f: new = Table.from_ASCII(f) assert all(default.data == new.data) and default.shapes == new.shapes
def test_read_strange(self, reference_dir, fname): with open(os.path.join(reference_dir, fname)) as f: Table.from_ASCII(f)
def test_write_read_str(self, default, tmpdir): default.to_ASCII(str(tmpdir.join('default.txt'))) new = Table.from_ASCII(str(tmpdir.join('default.txt'))) assert all(default.data == new.data) and default.shapes == new.shapes