예제 #1
0
def test_command_exists():
    assert shell.command_exists('cd')
    assert not shell.command_exists('ldfgyupmqzbch174')
예제 #2
0
def test_command_exists():
    assert shell.command_exists('cd')
    assert not shell.command_exists('ldfgyupmqzbch174')
예제 #3
0
from os.path import join as path_join
from shutil import copyfile

import pytest

from pyscaffold import shell
from pyscaffold.cli import main as putup
from pyscaffold.shell import command_exists, git
from pyscaffold.utils import chdir

__location__ = path_join(
    os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())))

pytestmark = pytest.mark.slow

untar = shell.ShellCommand(("gtar" if command_exists("gtar") else "tar") +
                           " xvzkf")
# ^ BSD tar differs in options from GNU tar,
#   so make sure to use the correct one...
#   https://xkcd.com/1168/


@pytest.fixture
def demoapp(tmpfolder, venv):
    return DemoApp(tmpfolder, venv)


@pytest.fixture
def demoapp_data(tmpfolder, venv):
    return DemoApp(tmpfolder, venv, data=True)
예제 #4
0
import pytest

from pyscaffold import shell
from pyscaffold.cli import main as putup
from pyscaffold.shell import command_exists, git
from pyscaffold.utils import chdir

__location__ = path_join(os.getcwd(), os.path.dirname(
    inspect.getfile(inspect.currentframe())))


pytestmark = pytest.mark.slow


untar = shell.ShellCommand(
            ("gtar" if command_exists("gtar") else "tar") + " xvzkf")
# ^ BSD tar differs in options from GNU tar,
#   so make sure to use the correct one...
#   https://xkcd.com/1168/


@pytest.fixture
def demoapp(tmpfolder, venv):
    return DemoApp(tmpfolder, venv)


@pytest.fixture
def demoapp_data(tmpfolder, venv):
    return DemoApp(tmpfolder, venv, data=True)

예제 #5
0
import pytest

from pyscaffold import shell
from pyscaffold.cli import main as putup
from pyscaffold.shell import command_exists, git
from pyscaffold.utils import chdir

__location__ = path_join(os.getcwd(), os.path.dirname(
    inspect.getfile(inspect.currentframe())))


pytestmark = pytest.mark.slow


untar = shell.ShellCommand(
            ("gtar" if command_exists("gtar") else "tar") + " xvzkf")
# ^ BSD tar differs in options from GNU tar,
#   so make sure to use the correct one...
#   https://xkcd.com/1168/


@pytest.fixture
def demoapp(tmpfolder, venv):
    return DemoApp(tmpfolder, venv)


@pytest.fixture
def demoapp_data(tmpfolder, venv):
    return DemoApp(tmpfolder, venv, data=True)

예제 #6
0
def test_command_exists():
    assert shell.command_exists("tar")
    assert not shell.command_exists("ldfgyupmqzbch174")