As I understand it does - it's the EnvironmentError that's checked with assertRaises. Plus it also checks for the error output.