For the gnocchi, cook the potatoes in their skins in a pan of boiling water for 10-15 minutes, or until tender (a knife should slide in without much resistance).
Drain the potatoes and set aside until cool enough to handle. Peel the potatoes and pass through a potato ricer into a bowl, then measure out 250g/8oz for the gnocchi.
For the tomato sauce, heat the olive oil in a small pan and gently fry the onion and garlic for 2-3 minutes, or until softened but not coloured. Add the tomato purée and chopped tomatoes and bring to a simmer. Reduce the heat slightly and cook for a further 10-15 minutes, stirring occasionally. Season with a pinch of sugar and some salt and freshly ground black pepper.
Meanwhile, tip the potato onto a floured work surface and knead in the flour until the mixture comes together to form a dough. Divide into four equal pieces and roll out into thick sausage shapes. Cut each sausage into 2cm/1in pieces and press with the tines of a fork to create a pattern.
Bring a large pot of salted water to the boil and add the gnocchi. Cook the gnocchi for 1-2 minutes, or until they float to the top. Remove with a slotted spoon and divide among serving bowls.
Spoon over the tomato sauce and garnish with fresh basil to serve.