Beispiel #1
0
def test_has_lt_version():
    assert has_lt_version('4.0a')
    assert has_lt_version('4.0')

    assert not has_lt_version('1.7')
    assert not has_lt_version(str(get_version()))
Beispiel #2
0
    monkeypatch.delenv("TMUX", raising=False)
    session_file = FIXTURE_PATH / "workspacebuilder" / "two_pane.yaml"

    # open it detached
    session = load_workspace(
        session_file,
        socket_name=server.socket_name,
        new_session_name="tmuxp-new",
        detached=True,
    )

    assert isinstance(session, libtmux.Session)
    assert session.name == "tmuxp-new"


@pytest.mark.skipif(has_lt_version("2.1"),
                    reason="exact session name matches only tmux >= 2.1")
def test_load_workspace_name_match_regression_252(tmp_path: pathlib.Path,
                                                  server, monkeypatch):
    monkeypatch.delenv("TMUX", raising=False)
    session_file = FIXTURE_PATH / "workspacebuilder" / "two_pane.yaml"

    # open it detached
    session = load_workspace(session_file,
                             socket_name=server.socket_name,
                             detached=True)

    assert isinstance(session, libtmux.Session)
    assert session.name == "sampleconfig"

    projfile = tmp_path / "simple.yaml"
Beispiel #3
0
    monkeypatch.delenv('TMUX', raising=False)
    session_file = curjoin("workspacebuilder/two_pane.yaml")

    # open it detached
    session = load_workspace(
        session_file,
        socket_name=server.socket_name,
        new_session_name='tmuxp-new',
        detached=True,
    )

    assert isinstance(session, libtmux.Session)
    assert session.name == 'tmuxp-new'


@pytest.mark.skipif(has_lt_version('2.1'),
                    reason='exact session name matches only tmux >= 2.1')
def test_load_workspace_name_match_regression_252(tmpdir, server, monkeypatch):
    monkeypatch.delenv('TMUX', raising=False)
    session_file = curjoin("workspacebuilder/two_pane.yaml")

    # open it detached
    session = load_workspace(session_file,
                             socket_name=server.socket_name,
                             detached=True)

    assert isinstance(session, libtmux.Session)
    assert session.name == 'sampleconfig'

    projfile = tmpdir.join('simple.yaml')
Beispiel #4
0
    # a tmux session by the developer himself, delete the TMUX variable
    # temporarily.
    monkeypatch.delenv('TMUX', raising=False)
    session_file = curjoin("workspacebuilder/two_pane.yaml")

    # open it detached
    session = load_workspace(
        session_file, socket_name=server.socket_name, detached=True
    )

    assert isinstance(session, libtmux.Session)
    assert session.name == 'sampleconfig'


@pytest.mark.skipif(
    has_lt_version('2.1'), reason='exact session name matches only tmux >= 2.1'
)
def test_load_workspace_name_match_regression_252(tmpdir, server, monkeypatch):
    monkeypatch.delenv('TMUX', raising=False)
    session_file = curjoin("workspacebuilder/two_pane.yaml")

    # open it detached
    session = load_workspace(
        session_file, socket_name=server.socket_name, detached=True
    )

    assert isinstance(session, libtmux.Session)
    assert session.name == 'sampleconfig'

    projfile = tmpdir.join('simple.yaml')
Beispiel #5
0
def test_has_lt_version():
    assert has_lt_version('4.0a')
    assert has_lt_version('4.0')

    assert not has_lt_version('1.7')
    assert not has_lt_version(str(get_version()))
Beispiel #6
0
def test_has_lt_version():
    assert has_lt_version("4.0a")
    assert has_lt_version("4.0")

    assert not has_lt_version("1.7")
    assert not has_lt_version(str(get_version()))