[PATCH] D25170: [lit] Throw in unimplemented method (NFC)
Brian Gesiak via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 2 18:31:42 PDT 2016
modocache created this revision.
modocache added reviewers: ddunbar, echristo, beanz.
modocache added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.
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.
https://reviews.llvm.org/D25170
Files:
utils/lit/lit/formats/base.py
Index: utils/lit/lit/formats/base.py
===================================================================
--- utils/lit/lit/formats/base.py
+++ utils/lit/lit/formats/base.py
@@ -81,7 +81,7 @@
yield test
def createTempInput(self, tmp, test):
- abstract
+ raise NotImplementedError('This is an abstract method.')
def execute(self, test, litConfig):
if test.config.unsupported:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25170.73231.patch
Type: text/x-patch
Size: 428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161003/e5a3be31/attachment.bin>
More information about the llvm-commits
mailing list