All the tests share the same blockchain, and we cannot control the order of the tests, so we cannot hardcode the expected coinbase output as the test may or may not run after a halving as occured.
Note that getblocktemplate cannot be used in this test framework, as we are stuck with a single node and this RPC fails if the node is not connected. So I reimplemented the equivalent of the node's GetBlockSubsidy function to compute the expected amount from the block height.