summaryrefslogtreecommitdiff
path: root/tools/scan-build-py/tests/unit/fixtures.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/scan-build-py/tests/unit/fixtures.py')
-rw-r--r--tools/scan-build-py/tests/unit/fixtures.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/tools/scan-build-py/tests/unit/fixtures.py b/tools/scan-build-py/tests/unit/fixtures.py
deleted file mode 100644
index d80f5e64774cc..0000000000000
--- a/tools/scan-build-py/tests/unit/fixtures.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-
-import contextlib
-import tempfile
-import shutil
-import unittest
-
-
-class Spy(object):
- def __init__(self):
- self.arg = None
- self.success = 0
-
- def call(self, params):
- self.arg = params
- return self.success
-
-
-@contextlib.contextmanager
-def TempDir():
- name = tempfile.mkdtemp(prefix='scan-build-test-')
- try:
- yield name
- finally:
- shutil.rmtree(name)
-
-
-class TestCase(unittest.TestCase):
- def assertIn(self, element, collection):
- found = False
- for it in collection:
- if element == it:
- found = True
-
- self.assertTrue(found, '{0} does not have {1}'.format(collection,
- element))