When are (weak) homotopy equivalence testable on open covers? 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?

 A: Let me offer sufficient conditions in both cases. They follow from the existence of the following two left proper model structures on the category of topological spaces, and the well-known gluing lemma holding in such categories:


*

*Weak equivalences = weak homotopy equivalences, cofibrations = retracts of relative CW-complexes, fibrations = Serre fibrations [Quillen].

*Weak equivalences = homotopy equivalences, cofibrations = closed immersion with the homotopy extension property, fibrations = Hurewicz fibrations [Strom].
In either case, it is enough to assume that $U\cap V$ contains a deformation retract $A\subset U\cap V$ such that $A\subset U$ or $A\subset V$ is a cofibration, and similarly fo $X'$.
A: 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.)
A: For weak homotopy equivalences this holds always (Theorem 6.7.9 in tom Dieck's Algebraic Topology).
For homotopy equivalences this holds provided the open covers are numerable (Theorem 4.2.7 loc. cit.)
