__str__ behaves differntly on py2 apparently.

This commit is contained in:
Jacob Bom 2016-10-16 13:19:42 +02:00
parent 5408c23e33
commit 39832d2f6b

View file

@ -208,11 +208,10 @@ class FiltersTest(BaseTest, unittest.TestCase):
self.assertRegexpMatches(
str((Filters.text & (Filters.forwarded | Filters.entity(MessageEntity.MENTION)))),
r"<telegram.ext.filters.MergedFilter consisting of "
r"<telegram.ext.filters.Filters._Text object at .*?> and "
r"<telegram.ext.filters.MergedFilter consisting of "
r"<telegram.ext.filters.Filters._Forwarded object at .*?> or "
r"<telegram.ext.filters.Filters.entity object at .*?>>>")
r"<telegram.ext.filters.MergedFilter consisting of <telegram.ext.filters.(Filters.)?_"
r"Text object at .*?> and <telegram.ext.filters.MergedFilter consisting of "
r"<telegram.ext.filters.(Filters.)?_Forwarded object at .*?> or "
r"<telegram.ext.filters.(Filters.)?entity object at .*?>>>")
def test_faulty_custom_filter(self):