#26430 closed enhancement (fixed)
py3: fix some doctests in combinat/designs
Reported by:  chapoton  Owned by:  

Priority:  major  Milestone:  sage8.5 
Component:  python3  Keywords:  
Cc:  Merged in:  
Authors:  Frédéric Chapoton  Reviewers:  Vincent Klein 
Report Upstream:  N/A  Work issues:  
Branch:  02755b9 (Commits, GitHub, GitLab)  Commit:  02755b916735f2aed81bc98a4b17ac3e302cdae3 
Dependencies:  Stopgaps: 
Description
Change History (14)
comment:1 Changed 2 years ago by
 Branch set to u/chapoton/26430
 Commit set to 677bf218f6837b8b10e116b7271d2a54db0a9041
 Status changed from new to needs_review
comment:2 Changed 2 years ago by
 Status changed from needs_review to needs_work
comment:3 Changed 2 years ago by
 Commit changed from 677bf218f6837b8b10e116b7271d2a54db0a9041 to 977f51d7c8163bfbc6142d12e80cf4e97addfde9
Branch pushed to git repo; I updated commit sha1. New commits:
977f51d  trac 26430 fixing doctests

comment:4 Changed 2 years ago by
 Status changed from needs_work to needs_review
comment:5 Changed 2 years ago by
 Commit changed from 977f51d7c8163bfbc6142d12e80cf4e97addfde9 to 89e9733c3c2001bd7926f13b44f35133bbcd0277
Branch pushed to git repo; I updated commit sha1. New commits:
89e9733  fix

comment:6 Changed 2 years ago by
 Owner changed from (none) to vklein
comment:7 Changed 2 years ago by
 return "Pairwise Balanced Design on {} points with sets of sizes in {}".format(self.num_points(),set(self.block_sizes())) + bsizes = str(frozenset(self.block_sizes()))[11:2] + bsizes = '{' + bsizes + '}' + return "Pairwise Balanced Design on {} points with sets of sizes in {}".format(self.num_points(), bsizes)
It works, but i think the syntax is a little complicated, what do you think about using a list instead ?
return "Pairwise Balanced Design on {} points with sets of sizes in {}".format(self.num_points(),list(set(self.block_sizes())))
This should give you the same output in py2 and py3 Pairwise ... sizes in [x, y ...]
comment:8 Changed 2 years ago by
 Owner changed from vklein to (none)
comment:9 Changed 2 years ago by
I am fine with the rest of the ticket. I will set it to positive review after your answer on the PairwiseBalancedDesign.__repr__
subject.
comment:10 Changed 2 years ago by
 Commit changed from 89e9733c3c2001bd7926f13b44f35133bbcd0277 to 02755b916735f2aed81bc98a4b17ac3e302cdae3
Branch pushed to git repo; I updated commit sha1. New commits:
02755b9  trac 26430 changing the repr to use list

comment:11 Changed 2 years ago by
ok, done
comment:12 Changed 2 years ago by
 Reviewers set to Vincent Klein
 Status changed from needs_review to positive_review
Thanks.
comment:13 Changed 2 years ago by
 Branch changed from u/chapoton/26430 to 02755b916735f2aed81bc98a4b17ac3e302cdae3
 Resolution set to fixed
 Status changed from positive_review to closed
comment:14 Changed 2 years ago by
 Milestone changed from sage8.4 to sage8.5
This should be retargeted for 8.5.
Note: See
TracTickets for help on using
tickets.
New commits:
py3: fix some doctests in combinat/designs