This example is creating a context on the project file of the project, that is, the .csproj. So this probably isn't returning what you'd expect. However, it shouldn't return you an empty list - for example, there's the "Everywhere" scope point which is always returned, regardless of the context.
It does look like there's a small bug in the context, though. It will only return a project if you create it with a source file, or a ProjectFolderWithLocation. If you create it with an IProjectFile, GetProject returns null. So try creating with an instance of ProjectFolderWithLocation - new ProjectFolderWithLcoation(project) would probably do it. I've raised an issue -
RSRP-466304.
Regards
Matt