Skip to content

Commit a3ea937

Browse files
ariebovenbergAlexWaygood
authored andcommitted
use AssertRaises as context manager
Co-authored-by: Alex Waygood <[email protected]>
1 parent 9911bde commit a3ea937

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ def test_entry_points_groups_get(self):
180180
entry_points().get('entries', 'default') == entry_points()['entries']
181181
entry_points().get('missing', ()) == ()
182182

183+
def test_entry_points_allows_no_attributes(self):
184+
with self.assertRaises(AttributeError):
185+
entry_points()['entries'][0].foo = 4
186+
183187
def test_metadata_for_this_package(self):
184188
md = metadata('egginfo-pkg')
185189
assert md['author'] == 'Steven Ma'

0 commit comments

Comments
 (0)