Skip to content

Commit 433e080

Browse files
committed
Add test of lost parent exception
1 parent 3582737 commit 433e080

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎astropy/table/tests/test_info.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from ... import table
1616
from ...utils.data_info import data_info_factory, dtype_info_name
1717
from ..table_helpers import simple_table
18+
import pytest
1819

1920

2021
def test_table_info_attributes(table_types):
@@ -241,3 +242,10 @@ def test_no_deprecation_warning():
241242
with warnings.catch_warnings(record=True) as warns:
242243
t.info()
243244
assert len(warns) == 0
245+
246+
247+
def test_lost_parent_error():
248+
c = table.Column([1, 2, 3], name='a')
249+
with pytest.raises(AttributeError) as err:
250+
c[:].info.name
251+
assert 'failed access "info" attribute' in str(err)

0 commit comments

Comments
 (0)