Use self.assert_error() wherever possible in AsmWriterTest