replaced Assert.fail with raise