Even if there is a captain on board preparing his papers, and I do final ground checks on e.g. a thrust reverser operational check I am responsible for what I do on the aircraft. When I as mechanic am still doing maintenance tasks, that means the aircraft is not declared serviceable by me, and the captain cannot have signed an acceptance, thus cannot be responsible. When I release the aircraft serviceable, captain signs, I am already in the coffee room!
I never had a situation where a copilot and mechanic are both acting in the cockpit. If I'm not qualified for an engine run, or no other mechanics can do this, the airplane stays on ground, crew or not.