def test_report(capsys): out, _ = capsys.readouterr() # Empty capsys # Reporting is now done by the external package scooby. # We just ensure the shown packages do not change (core and optional). if scooby: out1 = scooby.Report(core=['numpy', 'scipy', 'numba', 'empymod'], optional=['IPython', 'matplotlib'], ncol=3) out2 = utils.Report() # Ensure they're the same; exclude time to avoid errors. assert out1.__repr__()[115:] == out2.__repr__()[115:] else: # soft dependency _ = utils.Report() out, _ = capsys.readouterr() # Empty capsys assert 'WARNING :: `empymod.Report` requires `scooby`' in out
def test_versions_backwards(): if scooby: out1 = utils.Report() out2 = utils.Versions() out3 = utils.versions() # Exclude minutes and seconds, to avoid stupid failures. assert out1.__repr__()[150:] == out2.__repr__()[150:] assert out1.__repr__()[150:] == out3.__repr__()[150:]