How to use pyforest - 8 common examples

To help you get started, we’ve selected a few pyforest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_imports():
    from pyforest import os, pd, Path, active_imports

    os.name
    assert "import os" in active_imports()

    df = pd.DataFrame()
    assert "import pandas as pd" in active_imports()

    Path(".")
    assert "from pathlib import Path" in active_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_complementary_import():
    from pyforest import pd, active_imports

    df = pd.DataFrame()
    assert "import pandas_profiling" in active_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_complementary_import():
    from pyforest import pd, active_imports

    df = pd.DataFrame()
    assert "import pandas_profiling" in active_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_imports():
    from pyforest import os, pd, Path, active_imports

    os.name
    assert "import os" in active_imports()

    df = pd.DataFrame()
    assert "import pandas as pd" in active_imports()

    Path(".")
    assert "from pathlib import Path" in active_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_imports():
    from pyforest import os, pd, Path, active_imports

    os.name
    assert "import os" in active_imports()

    df = pd.DataFrame()
    assert "import pandas as pd" in active_imports()

    Path(".")
    assert "from pathlib import Path" in active_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_auto_import():
    from pyforest.auto_import import setup as setup_auto_import

    assert setup_auto_import()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_lazy_imports():
    from pyforest import lazy_imports

    # if the module e.g. "re" has been imported in test_imports() this test will fail
    assert "import re" in lazy_imports()
github 8080labs / pyforest / tests / test_pyforest.py View on Github external
def test_imports():
    from pyforest import os, pd, Path, active_imports

    os.name
    assert "import os" in active_imports()

    df = pd.DataFrame()
    assert "import pandas as pd" in active_imports()

    Path(".")
    assert "from pathlib import Path" in active_imports()

pyforest

Lazy-import of all popular Python Data Science libraries. Stop writing the same imports over and over again.

MIT
Latest version published 6 months ago

Package Health Score

65 / 100
Full package analysis