def test_set_default_config(cd_to_tmpdir): qibuild.config.add_build_config("foo") build_worktree = TestBuildWorkTree() build_worktree.set_default_config("foo") assert build_worktree.default_config == "foo" build_worktree2 = TestBuildWorkTree() assert build_worktree2.default_config == "foo"
def test_set_default_config(cd_to_tmpdir): qibuild.config.add_build_config("foo") build_worktree = TestBuildWorkTree() build_worktree.set_default_config("foo") assert build_worktree.default_config == "foo" build_worktree2 = TestBuildWorkTree() assert build_worktree2.default_config == "foo"
def test_set_default_config(cd_to_tmpdir): # pylint: disable=unused-argument qibuild.config.add_build_config("foo") build_worktree = TestBuildWorkTree() build_worktree.set_default_config("foo") assert build_worktree.default_config == "foo" build_worktree2 = TestBuildWorkTree() assert build_worktree2.default_config == "foo"
def test_when_is_default(qitoolchain_action): qitoolchain_action("create", "foo") qibuild.config.add_build_config("foo", toolchain="foo") test_build_worktre1 = TestBuildWorkTree() test_build_worktre1.set_default_config("foo") qitoolchain_action("remove", "foo", "--force") test_build_worktre2 = TestBuildWorkTree() assert test_build_worktre2.toolchain is None
def test_when_is_default(qitoolchain_action): qitoolchain_action("create", "foo") qibuild.config.add_build_config("foo", toolchain="foo") test_build_worktre1 = TestBuildWorkTree() test_build_worktre1.set_default_config("foo") qitoolchain_action("remove", "foo", "--force") test_build_worktre2 = TestBuildWorkTree() # pylint:disable-msg=E1101 with pytest.raises(Exception) as e: test_build_worktre2.toolchain # pylint: disable=pointless-statement assert "No such toolchain" in e.value.message
def test_when_is_default(qitoolchain_action): """ Test When Is Default """ qitoolchain_action("create", "foo") qibuild.config.add_build_config("foo", toolchain="foo") test_build_worktre1 = TestBuildWorkTree() test_build_worktre1.set_default_config("foo") qitoolchain_action("remove", "foo", "--force") test_build_worktre2 = TestBuildWorkTree() with pytest.raises(Exception) as e: test_build_worktre2.toolchain # pylint:disable=pointless-statement assert "No such toolchain" in e.value.message
def test_when_is_default(qitoolchain_action): qitoolchain_action("create", "foo") qibuild.config.add_build_config("foo", toolchain="foo") test_build_worktre1 = TestBuildWorkTree() test_build_worktre1.set_default_config("foo") qitoolchain_action("remove", "foo", "--force") test_build_worktre2 = TestBuildWorkTree() # pylint:disable-msg=E1101 with pytest.raises(Exception) as e: test_build_worktre2.toolchain assert "No such toolchain" in e.value.message