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

EmptySet is Back ! TestSuite should allows for empty sets. #8543

Closed
hivert opened this issue Mar 15, 2010 · 11 comments
Closed

EmptySet is Back ! TestSuite should allows for empty sets. #8543

hivert opened this issue Mar 15, 2010 · 11 comments

Comments

@hivert
Copy link

hivert commented Mar 15, 2010

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

CC: @sagetrac-nborie @sagetrac-sage-combinat

Component: categories

Keywords: empty set, Testsuite, EmptySetError

Author: Florent Hivert

Reviewer: Nicolas Borie, Nicolas M. Thiéry

Merged: sage-4.4.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8543

@hivert hivert added this to the sage-4.4 milestone Mar 15, 2010
@hivert hivert self-assigned this Mar 15, 2010
@hivert
Copy link
Author

hivert commented Mar 23, 2010

Attachment: trac_8543-empty_set_categories-fh.patch.gz

@hivert
Copy link
Author

hivert commented Mar 23, 2010

Changed keywords from empty set, Testsuite to empty set, Testsuite, EmptySetError

@hivert

This comment has been minimized.

@hivert hivert changed the title EmptySet is Back ! EmptySet is Back ! TestSuite should allows for empty sets. Mar 23, 2010
@sagetrac-nborie
Copy link
Mannequin

sagetrac-nborie mannequin commented Mar 23, 2010

comment:2

Patches from #8519 your patch apply fine on 4.3.4
All tests passed for each touched files, doc is OK too. This another empty problem is fixed...

Thanks for fixing this!

I give this patch a positive review...

@sagetrac-nborie
Copy link
Mannequin

sagetrac-nborie mannequin commented Mar 23, 2010

Reviewer: Nicolas Borie

@nthiery
Copy link
Contributor

nthiery commented Apr 16, 2010

comment:3

Nicolas: thanks for your review!

Florent: I made a quick reviewer patch fixing some trivial things. Please double check, and set back the positive review!

@nthiery
Copy link
Contributor

nthiery commented Apr 16, 2010

comment:4

Attachment: trac_8543-empty_set_categories-review-nt.patch.gz

@nthiery
Copy link
Contributor

nthiery commented Apr 16, 2010

Changed reviewer from Nicolas Borie to Nicolas Borie, Nicolas M. Thiéry

@hivert
Copy link
Author

hivert commented Apr 17, 2010

comment:7

The new changes are good to me => positive review.

@jhpalmieri
Copy link
Member

Merged: sage-4.4.alpha0

@jhpalmieri
Copy link
Member

comment:8

Merged in 4.4.alpha0:

  • trac_8543-empty_set_categories-fh.patch
  • trac_8543-empty_set_categories-review-nt.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants