def gstreamer_info(): other = [] other.append(f"Python wrapper: python-gi {gi.__version__}") found_elements = [] missing_elements = [] for name, status in _gstreamer_check_elements(): if status: found_elements.append(name) else: missing_elements.append(name) other.append("Relevant elements:") other.append(" Found:") for element in found_elements: other.append(f" {element}") if not found_elements: other.append(" none") other.append(" Not found:") for element in missing_elements: other.append(f" {element}") if not missing_elements: other.append(" none") return { "name": "GStreamer", "version": ".".join(map(str, Gst.version())), "path": os.path.dirname(gi.__file__), "other": "\n".join(other), }
def gstreamer_info(): other = [] other.append('Python wrapper: python-gi %s' % gi.__version__) found_elements = [] missing_elements = [] for name, status in _gstreamer_check_elements(): if status: found_elements.append(name) else: missing_elements.append(name) other.append('Relevant elements:') other.append(' Found:') for element in found_elements: other.append(' %s' % element) if not found_elements: other.append(' none') other.append(' Not found:') for element in missing_elements: other.append(' %s' % element) if not missing_elements: other.append(' none') return { 'name': 'GStreamer', 'version': '.'.join(map(str, Gst.version())), 'path': os.path.dirname(gi.__file__), 'other': '\n'.join(other), }
def test_gstreamer_info(self): result = deps.gstreamer_info() assert "GStreamer" == result["name"] assert ".".join(map(str, Gst.version())) == result["version"] assert "gi" in result["path"] assert "__init__.py" not in result["path"] assert "Python wrapper: python-gi" in result["other"] assert gi.__version__ in result["other"] assert "Relevant elements:" in result["other"]
def test_gstreamer_info(self): result = deps.gstreamer_info() self.assertEqual('GStreamer', result['name']) self.assertEqual('.'.join(map(str, Gst.version())), result['version']) self.assertIn('gi', result['path']) self.assertNotIn('__init__.py', result['path']) self.assertIn('Python wrapper: python-gi', result['other']) self.assertIn(gi.__version__, result['other']) self.assertIn('Relevant elements:', result['other'])
def test_gstreamer_info(self): result = deps.gstreamer_info() self.assertEqual('GStreamer', result['name']) self.assertEqual( '.'.join(map(str, Gst.version())), result['version']) self.assertIn('gi', result['path']) self.assertNotIn('__init__.py', result['path']) self.assertIn('Python wrapper: python-gi', result['other']) self.assertIn(gi.__version__, result['other']) self.assertIn('Relevant elements:', result['other'])