This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author graingert
Recipients aldencolerain, ezio.melotti, georg.brandl, graingert, gregory.p.smith, martin.panter, michael.foord, r.david.murray, rbcollins, rhettinger, serhiy.storchaka, terry.reedy, vitaly
Date 2019-09-21.09:55:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569059701.19.0.45651632796.issue27071@roundup.psfhosted.org>
In-reply-to
Content
While it may not appear to be a permutation, python already considers it one:

    graingert@onomastic:~$ cat test_assert_permutation.py 
    import itertools
    import unittest
    from decimal import Decimal
    from fractions import Fraction


    class TestAssertPermutation(unittest.TestCase):
        def assertPermutation(self, a, b):
            return self.assertIn(tuple(a), itertools.permutations(b))

        def test_do_not_look_like_permutations(self):
            self.assertPermutation(
                [Decimal(3), 5, Fraction(12, 4)], [3.0, 3, Fraction(15, 3)]
            )


    if __name__ == "__main__":
        unittest.main()
    graingert@onomastic:~$ python3 test_assert_permutation.py -v
    test_do_not_look_like_permutations (__main__.TestAssertPermutation) ... ok

    ----------------------------------------------------------------------
    Ran 1 test in 0.000s

    OK
History
Date User Action Args
2019-09-21 09:55:01graingertsetrecipients: + graingert, georg.brandl, rhettinger, terry.reedy, gregory.p.smith, rbcollins, ezio.melotti, r.david.murray, michael.foord, martin.panter, serhiy.storchaka, vitaly, aldencolerain
2019-09-21 09:55:01graingertsetmessageid: <1569059701.19.0.45651632796.issue27071@roundup.psfhosted.org>
2019-09-21 09:55:01graingertlinkissue27071 messages
2019-09-21 09:55:00graingertcreate