コード例 #1
0
 async def debug_info(self, ctx):
     """Get info about libs used by leveler and environment info"""
     try:
         from dns.version import version as dns_version
     except ImportError:
         dns_version = None
     except Exception as e:
         dns_version = e.__class__.__qualname__
     # tkinter already failed once due to incorrect installation (?)
     pil_features = []
     for feature in pilfeatures.get_supported():
         try:
             feature = (feature, pilfeatures.version(feature) or "N/A")
         except Exception as e:
             feature = (feature, type(e))
         pil_features.append(feature)
     # noinspection PyProtectedMember
     await ctx.send(
         chat.box(
             tabulate(
                 [
                     ("DB lock locked", self._db_lock.locked()),
                     (
                         "DB lock queue",
                         "N/A" if self._db_lock._waiters is None else len(
                             self._db_lock._waiters),
                     ),
                     ("pymongo version", pymongoversion),
                     ("motor version", motorversion),
                     (
                         "Mongo DB version",
                         (await self.client.server_info()).get(
                             "version", "?"),
                     ),
                     ("dnspython version", dns_version),
                     ("PIL version", pilfeatures.version("pil")),
                     (
                         "PIL features",
                         tabulate(pil_features, tablefmt="psql"),
                     ),
                 ],
                 tablefmt="psql",
             )))
コード例 #2
0
 def test_supported_modules(self):
     self.assertIsInstance(features.get_supported_modules(), list)
     self.assertIsInstance(features.get_supported_codecs(), list)
     self.assertIsInstance(features.get_supported_features(), list)
     self.assertIsInstance(features.get_supported(), list)
コード例 #3
0
from PIL import features

print('Pillow was built with following modules: {}'.format(
    repr(features.get_supported())))
コード例 #4
0
def test_supported_modules():
    assert isinstance(features.get_supported_modules(), list)
    assert isinstance(features.get_supported_codecs(), list)
    assert isinstance(features.get_supported_features(), list)
    assert isinstance(features.get_supported(), list)
コード例 #5
0
ファイル: test_features.py プロジェクト: anntzer/Pillow
 def test_supported_modules(self):
     self.assertIsInstance(features.get_supported_modules(), list)
     self.assertIsInstance(features.get_supported_codecs(), list)
     self.assertIsInstance(features.get_supported_features(), list)
     self.assertIsInstance(features.get_supported(), list)