예제 #1
0
def test_setup(node_package):
    node_package_dir = nodely.NODE_MODULES_DIR / node_package
    nodely.uninstall(node_package)
    assert not node_package_dir.exists()
    zetup.call([sys.executable, 'setup.py', 'develop'],
               cwd=os.path.dirname(os.path.realpath(__file__)))
    assert node_package_dir.isdir()
예제 #2
0
def test_install(node_package):
    node_package_dir = nodely.NODE_MODULES_DIR / node_package
    nodely.install(node_package)
    assert node_package_dir.isdir()
    nodely.uninstall(node_package)
    assert not node_package_dir.exists()
    nodely.install(node_package)
    assert node_package_dir.isdir()
예제 #3
0
def test_require_node_modules_from_string(node_package):
    node_package_dir = nodely.NODE_MODULES_DIR / node_package
    nodely.uninstall(node_package)
    assert not node_package_dir.exists()
    require_node_modules(dist=None,
                         jsmodules="""
    {}
    """.format(node_package))
    assert node_package_dir.isdir()
예제 #4
0
def test_require_node_modules(node_package):
    node_package_dir = nodely.NODE_MODULES_DIR / node_package
    nodely.uninstall(node_package)
    assert not node_package_dir.exists()

    # HACK: Python 3.5 on Travis CI strangely reports missing coverage
    require_node_modules(
        dist=None,
        jsmodules=[  # pragma: no cover
            node_package,
        ])
    assert node_package_dir.isdir()
예제 #5
0
def test_require_node_modules_without_jsmodules(node_package):
    nodely.uninstall(node_package)
    node_modules_content = nodely.NODE_MODULES_DIR.listdir()
    require_node_modules(dist=None)
    assert node_modules_content == nodely.NODE_MODULES_DIR.listdir()
예제 #6
0
def test_require_node_modules(node_package):
    node_package_dir = nodely.NODE_MODULES_DIR / node_package
    nodely.uninstall(node_package)
    assert not node_package_dir.exists()
    require_node_modules(dist=None, jsmodules=[node_package])
    assert node_package_dir.isdir()