# Counterexamples to Whitehead's Theorem for non-CW complexes

Whitehead's theorem states that if X,Y are CW complexes and $$f:X\to Y$$ induces an isomorphism $$f_* : \pi_n(X) \to \pi_n(Y)$$ for all $$n$$, then $$f$$ is a homotopy equivalence. Are there simple counterexamples to this theorem in the case that $$X$$ and $$Y$$ are not CW complexes? I'm having trouble thinking about this, because I don't often think about spaces that aren't CW complexes, so I apologize if I've missed a simple counterexample.

Take $$X$$= one-point space, $$Y$$ = Warsaw circle and $$f : X \to Y$$ any map.
Another classical example is the so called pseudocircle, the space on a four points set $$X=\{a,b,c,d\}$$ with open sets $$\tau=\{\{a,b,c,d\},\{a,b,c\},\{a,b,d\},\{a,b\},\{a\},\{b\},\varnothing\}$$. There is a continuous map $$f\colon S^1\to X$$ that induces an isomorphism on all homotopy groups, but the two spaces are obviously not homotopy equivalent.
$$X=$$ one-point space, $$Y=$$ the long line, then any maps $$X\to Y, Y\to X$$ are weak equivalences but not homotopy equivalences (the long line is "too long" to be shrunk to a point by a homotopy)
Another example (which is an example for a different reason) is $$\mathbb Q$$ with the discrete topology, which I'll denote $$\mathbb Q^{dis}$$ and $$\mathbb Q$$ with the usual topology : $$id : \mathbb Q^{dis}\to \mathbb Q$$ is continuous and is a weak equivalence, but it's not a homotopy equivalence (any map $$\mathbb Q\to\mathbb Q^{dis}$$ which induces an isomorphism on $$\pi_0$$ must be the identity, and it's not continuous)
Mor generally, for any space $$X$$ you can find (explicitly) a CW-complex $$Y$$ and a weak equivalence $$Y\to X$$. So if you know for some reason that $$X$$ does not have the (strong) homotopy type of a CW complex, then you can use this as an example. This will work for, e.g. any non- (semi-locally simply connected) space, such as the Hawaiian earrings.