TITLE: When are (weak) homotopy equivalence testable on open covers?
QUESTION [12 upvotes]: I asked this question on math.stackexchange, but did not get an answer.
Let $f\colon X\rightarrow X'$ be a continuous map between two spaces $X,X'$, which might be arbitrary wild, especially I don't want to work in any convenient category of topological spaces. Let $X=U\cup V$ and $X'=U'\cup V'$ be open covers such that $f(U)\subseteq U'$ and $f(V)\subseteq V'$ holds.
Consider the following claim.

If the three restrictions $f\colon U\rightarrow V$, $f\colon V\rightarrow V'$ and $f\colon U\cap U'\rightarrow V\cap V'$ are weak homotopy equivalences, then so is $f\colon X\rightarrow X'$.


Is this claim true in general? If not, are there mild assumptions on $X$, $X'$ or $X$ and $X'$, such that the claim holds, e.g. does the claim hold if $X$ and $X'$ are Hausdorff spaces? 
What about the corresponding claim with homotopy equivalences instead of weak equivalences?

REPLY [2 votes]: The claim about weak equivalences follows as soon as one proves that the cocartesian squares generated by U←U∩V→V and U'←U'∩V'→V' are also homotopy cocartesian.
To this end one can use Lurie's Seifert-van Kampen theorem (Theorem A.3.1 in Higher Algebra) to establish that these squares are always homotopy cocartesian: in Lurie's
notation, take C={1←0→2} and the functor χ sends C to {U←U∩V→V}.
The fact that {U,V} is an open cover of X establishes
the required property (*).
(Of course, this particular fact had been established
long before Lurie's book came out and can be found in many older, less accessible references.)