CI: Skip test if the emoji dep is not here
This commit is contained in:
parent
525855c17b
commit
b4dd1e0132
1 changed files with 6 additions and 5 deletions
|
@ -13,6 +13,11 @@ from slixmpp.plugins.xep_0444 import XEP_0444
|
||||||
import slixmpp.plugins.xep_0444.stanza as stanza
|
import slixmpp.plugins.xep_0444.stanza as stanza
|
||||||
from slixmpp.xmlstream import register_stanza_plugin
|
from slixmpp.xmlstream import register_stanza_plugin
|
||||||
|
|
||||||
|
try:
|
||||||
|
import emoji
|
||||||
|
except ImportError:
|
||||||
|
emoji = None
|
||||||
|
|
||||||
|
|
||||||
class TestReactions(SlixTest):
|
class TestReactions(SlixTest):
|
||||||
|
|
||||||
|
@ -41,13 +46,9 @@ class TestReactions(SlixTest):
|
||||||
self.assertEqual({'😃', '🤗'}, msg['reactions']['values'])
|
self.assertEqual({'😃', '🤗'}, msg['reactions']['values'])
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(emoji is None, 'Emoji package not installed')
|
||||||
def testCreateReactionsUnrestricted(self):
|
def testCreateReactionsUnrestricted(self):
|
||||||
"""Testing creating Reactions with the extra all_chars arg."""
|
"""Testing creating Reactions with the extra all_chars arg."""
|
||||||
try:
|
|
||||||
import emoji
|
|
||||||
except ImportError:
|
|
||||||
# No emoji package: this test does not make sense
|
|
||||||
return
|
|
||||||
xmlstring = """
|
xmlstring = """
|
||||||
<message>
|
<message>
|
||||||
<reactions xmlns="urn:xmpp:reactions:0" id="abcd">
|
<reactions xmlns="urn:xmpp:reactions:0" id="abcd">
|
||||||
|
|
Loading…
Reference in a new issue