Пример #1
0
    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)
Пример #2
0
 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
Пример #3
0
 def setUp(self):
     PandasTools.InstallPandasTools()
     PandasTools.ChangeMoleculeRendering(renderer='PNG')
     self._molRepresentation = PandasTools.molRepresentation
     self._highlightSubstructures = PandasTools.highlightSubstructures