Exemple #1
0
# -*- coding: utf-8 -*-
from pca.utils.imports import import_all_names

import_all_names(__file__, __name__)
Exemple #2
0
from pca.utils.imports import import_all_names


import_all_names(__file__, __name__)
Exemple #3
0
def test_import_warning():
    with pytest.warns(None) as record:
        import_all_names(__file__, __name__)
    assert issubclass(record[-1].category, UserWarning)
    assert "conflicting names" in str(record[-1].message)
def test_import_warning():
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter("always")
        import_all_names(__file__, __name__)
        assert issubclass(w[-1].category, UserWarning)
        assert "conflicting names" in str(w[-1].message)
Exemple #5
0
def test_import_warning():
    with pytest.warns(None) as record:
        import_all_names(__file__, __name__)
    assert issubclass(record[-1].category, UserWarning)
    assert "conflicting names" in str(record[-1].message)