def test_repr(self):
        self.assertEquals(u"Query(<lambda>)", repr(self.query))

        def integers():
            return range(100)

        self.assertEquals(u"Query(integers)", repr(Query(integers)))

        self.assertEquals(u"Query(<lambda>).map(<lambda>)", repr(self.query.map(lambda x: x + 1)))
        self.assertEquals(u"Query(<lambda>).map(x + 1)", repr(self.query.map(lambda x: x + 1, 'x + 1')))
        self.assertEquals(
            u"Query(<lambda>).map(x + 1).filter(<lambda>)",
            repr(self.query.map(lambda x: x + 1, 'x + 1').filter(lambda x: x > 2))
        )
        self.assertEquals(
            u"Query(<lambda>).transform(<lambda>)",
            repr(self.query.transform(lambda xs: iter(xs).next(0)))
        )
        self.assertEquals(
            u"Query(<lambda>).filter(text='foo')",
            repr(self.query.filter(text='foo'))
        )
dataset/ETHPy150Open edx/bok-choy/tests/test_query.py/TestQuery.test_repr/original