TYPO3CR_BaseTest uses global variables
In order to save memory / improve performance (I assume), the TYPO3CR_BaseTest stores the Repository and Session instance into a global variable. That's bad and needs a different solution.
In general it might be that the tests could be implemented in a way which doesn't really need a repository etc. but rather a mock repository. That's very likely, especially if true unit testing is done.
Please also read Jimmy Nilssons remarks about testing repositories, that might help a little.