EmptySet is Back ! TestSuite should allows for empty sets.
|Reported by:||hivert||Owned by:||hivert|
|Component:||categories||Keywords:||empty set, Testsuite, EmptySetError|
|Cc:||nborie, sage-combinat||Merged in:||sage-4.4.alpha0|
|Authors:||Florent Hivert||Reviewers:||Nicolas Borie, Nicolas M. Thiéry|
|Report Upstream:||N/A||Work issues:|
Description (last modified by hivert)
There is currently no way to have an empty set which pass the category tests. Indeed the current specification says: for any set S there must be a method S.an_element() which returns an actual element x such that x in S:
an_element = self.an_element() tester.assert_(an_element in self, "self.an_element() is not in self")
This tests should allows S to be empty.
To solve this issue I added a new exception called EmptySetError which should be raised in such cases. I fixed the tests suite of the category Sets() accordingly and expanded the test in some places where this could be done before.
Depends on #8519
Change History (10)
Changed 6 years ago by hivert
comment:1 Changed 6 years ago by hivert
- Description modified (diff)
- Keywords EmptySetError added
- Status changed from new to needs_review
- Summary changed from EmptySet is Back ! to EmptySet is Back ! TestSuite should allows for empty sets.
comment:2 Changed 6 years ago by nborie
- Reviewers set to Nicolas Borie
- Status changed from needs_review to positive_review
Changed 5 years ago by nthiery
comment:6 Changed 5 years ago by nthiery
- Reviewers changed from Nicolas Borie to Nicolas Borie, Nicolas M. Thiéry