numpy.testing.utils.WarningManager

Here are the examples of the python api numpy.testing.utils.WarningManager taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: statsmodels Source File: test_formula.py
    def test_summary(self):
        # smoke test
        warn_ctx = WarningManager()
        warn_ctx.__enter__()
        try:
            warnings.filterwarnings("ignore",
                                    "kurtosistest only valid for n>=20")
            self.model.fit().summary()
        finally:
            warn_ctx.__exit__()