[llvm] r283090 - [lit] Throw in unimplemented method (NFC)

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 2 21:48:22 PDT 2016


Author: cbieneman
Date: Sun Oct  2 23:48:22 2016
New Revision: 283090

URL: http://llvm.org/viewvc/llvm-project?rev=283090&view=rev
Log:
[lit] Throw in unimplemented method (NFC)

Summary:
lit's `OneCommandFileTest` class implements an abstract method that
raises if called. However, it raises by referencing an undefined
symbol. Instead, raise explicitly by throwing a `NotImplementedError`.
This is clearer, and appeases Python linters.

Patch By Brian Gesiak!

Reviewers: ddunbar, echristo, beanz

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25170

Modified:
    llvm/trunk/utils/lit/lit/formats/base.py

Modified: llvm/trunk/utils/lit/lit/formats/base.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/formats/base.py?rev=283090&r1=283089&r2=283090&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/formats/base.py (original)
+++ llvm/trunk/utils/lit/lit/formats/base.py Sun Oct  2 23:48:22 2016
@@ -80,7 +80,7 @@ class OneCommandPerFileTest(TestFormat):
                 yield test
 
     def createTempInput(self, tmp, test):
-        abstract
+        raise NotImplementedError('This is an abstract method.')
 
     def execute(self, test, litConfig):
         if test.config.unsupported:




More information about the llvm-commits mailing list