Edit: As there are many comments and an answer already, I have left the original question below.
I was unaware that there are different ways one could try to define $\mathsf{hTop}_{\bullet}$, 'the' homotopy category of pointed topological spaces. The two that were discussed in the comments were:
- the category with pointed topological spaces as objects and morphisms given by base-point preserving homotopy classes of maps (i.e. $\operatorname{Hom}(X, Y) = [X, Y]_{\bullet}$), and
- the category $\mathsf{Top}_{\bullet}$ localised at weak homotopy equivalences.
If I'm not mistaken, Zhen Lin was referring to the first while Najib Idrissi was referring to the second. When I asked the question, I was thinking about the first category so the questions below remain unanswered.
With this in mind, I'm now a little concerned about the difference between homotopy equivalent and base-point preserving homotopy equivalent. For example, the comb space $C$ is homotopy equivalent to a point (i.e. contractible), but $(0, 1)$ is not a strong deformation retract of $C$, so $(C, (0, 1))$ is not base-point preserving homotopy equivalent to a point. I'm not sure if this distinction will play a role in answering question $1$.
Throughout, $(X, x_0)$ and $(Y, y_0)$ will be connected pointed topological spaces.
If $f : (X, x_0) \to (Y, y_0)$ is a continuous map and $f_* : \pi_n(X, x_0) \to \pi_n(Y, y_0)$ is an isomorphism for $n > 0$, then $f$ is called a weak homotopy equivalence. The Whitehead Theorem states that if $X$ and $Y$ are CW complexes, then a weak homotopy equivalence is in fact a homotopy equivalence.
Note, the existence of a map $f$ which induces isomorphisms of homotopy groups is necessary as there are CW complexes which have isomorphic homotopy groups but are not homotopy equivalent; for example, $S^2\times\mathbb{RP}^3$ and $\mathbb{RP}^2\times S^3$ (they have different second integral homology).
The $n^{\text{th}}$ homotopy group of a space $X$ can be defined as $[S^n, X]_{\bullet}$ which denotes the pointed homotopy classes of maps from $S^n$ to $X$. This is a group because spheres are cogroup objects in the category $\mathsf{hTop}_{\bullet}$. There are other cogroup objects in this category, including (but not limited to) suspensions of arbitrary topological spaces.
With this in mind, my first question is:
Question $1$: If $f : (X, x_0) \to (Y, y_0)$ is a continuous map such that $f_* : [Z, X]_{\bullet} \to [Z, Y]_{\bullet}$ is an isomorphism for every cogroup object $Z$ in $\mathsf{hTop}_{\bullet}$, are $X$ and $Y$ homotopy equivalent?
If the answer to question $1$ is yes, my next question is
Question $2\, (a)$: If $[Z, X]_{\bullet} \cong [Z, Y]_{\bullet}$ for every cogroup object $Z$ in $\mathsf{hTop}_{\bullet}$, are $X$ and $Y$ homotopy equivalent?
If the answer to question $1$ is no, my next question is
Question $2\, (b)$: Let $\mathcal{F}$ be a collection of cogroup objects in $\mathsf{hTop}_{\bullet}$. For which $\mathcal{F}$ is the following true: if $f : (X, x_0) \to (Y, y_0)$ induces isomorphisms $f_* : [Z, X]_{\bullet} \to [Z, Y]_{\bullet}$ for all $Z \in \mathcal{F}$, then $X$ and $Y$ are weakly homotopy equivalent.
Furthermore, is there a finite such $\mathcal{F}$? Is there an analogue of Whitehead's Theorem for all such $\mathcal{F}$?
For question 1 (per request).
Note: This answer uses the definition of $[X,Y]_\bullet$ from model category theory. So essentially $\operatorname{Ho}(\mathsf{Top}_\bullet)$ is the localization of $\mathsf{Top}_\bullet$ at weak equivalences, and $\hom_{\operatorname{Ho}(\mathsf{Top}_\bullet)}(X,Y) = \hom_{\mathsf{Top}_\bullet}(Q_X, R_Y) / \sim$ where $Q_X$ is a cofibrant replacement of $X$ and $R_Y$ is a fibrant replacement of $Y$. Cofibrant objects are retracts of generalized CW-complexes, and all objects are fibrant. This is not necessarily the definition you want.
Suppose that $f : X \to Y$ is a weak homotopy equivalence. Put on $\mathsf{Top}_*$ the standard model structure where weak equivalences are weak homotopy equivalences, fibrations are Serre fibrations and cofibrations are determined via lifting properties (I believe they're retracts of generalized CW-complex inclusions). Then $\operatorname{Ho}(\mathsf{Top}_*)$ is the localization of $\mathsf{Top}_*$ at the class of weak homotopy equivalences, and $[A,B]_\bullet = \hom_{\operatorname{Ho}(\mathsf{Top}_*}(A,B)$. Then $f$ is mapped to an isomorphism in $\operatorname{Ho}(\mathsf{Top}_*)$ (by definition), thus it's mapped by the Yoneda embedding to a natural isomorphism $$f_* : [-, X]_\bullet \cong [-, Y]_\bullet.$$
In particular $f_*$ is a bijection for all pointed spaces $Z$, not just cogroups, whenever $f$ is a weak homotopy equivalence. Now just pick some $f$ which is a weak homotopy equivalence but not a strong homotopy equivalence to conclude (for example, the inclusion of a point in the long line is a weak equivalence, but the long line is not contractible).