I'm assuming there is a feature class Test_Points in the gdb. This is a feature class, not a layer.
If you want to do selections on it, you need to create a new layer in memory from it using the Make Feature Layer tool.
When running the script in Pro I am assuming there is a layer in the currently active map named Test_Points and also a feature class in your gdb; the layer takes precedence which is why it works in a pro window.
By the way I also recommend using the arcpy.da cursors instead, they are dramatically more efficient than the (older) arcpy cursors.
NOTE: original post is below in the thread