def test_RestoreMonkeyPatch(self): sio = getStreamIO(methane + peroxide) df = PandasTools.LoadSDF(sio) html = df.to_html() self.assertIn('data:image/png;base64', html) self.assertIn('table', html) PandasTools.UninstallPandasTools() html = df.to_html() self.assertNotIn('data:image/png;base64', html) self.assertIn('rdkit.Chem.rdchem.Mol', html) self.assertIn('table', html) PandasTools.InstallPandasTools() html = df.to_html() self.assertIn('data:image/png;base64', html) self.assertIn('table', html) PandasTools.UninstallPandasTools() html = df.to_html() self.assertNotIn('data:image/png;base64', html) self.assertIn('rdkit.Chem.rdchem.Mol', html) self.assertIn('table', html)
def setUp(self): PandasTools.InstallPandasTools() PandasTools.ChangeMoleculeRendering(renderer='PNG') PandasTools.pd.set_option('display.max_columns', None) self._molRepresentation = PandasTools.molRepresentation self._highlightSubstructures = PandasTools.highlightSubstructures
def setUp(self): PandasTools.InstallPandasTools() PandasTools.ChangeMoleculeRendering(renderer='PNG') self._molRepresentation = PandasTools.molRepresentation self._highlightSubstructures = PandasTools.highlightSubstructures