diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-05-18 19:44:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 19:44:57 +0300 |
commit | 5ec6151e56140a19ef185052ffb02bd1ff957bd7 (patch) | |
tree | 53346478d8e84aefd170ac6226938ca89d6d0a77 /run_unittests.py | |
parent | a31bc4ede5883d449c15c90535b21bc8f9e28d6d (diff) | |
parent | 0e56ec2dbdbbd463d608c42e0aa117357e18936a (diff) | |
download | meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.zip meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.gz meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.bz2 |
Merge pull request #1810 from QuLogic/pycharm-warnings
Fix various warnings found in PyCharm
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index 611e164..85474e8 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -18,7 +18,10 @@ import shlex import subprocess import re, json import tempfile -import unittest, os, sys, shutil, time +import os +import shutil +import sys +import unittest from glob import glob from pathlib import PurePath import mesonbuild.compilers @@ -247,6 +250,7 @@ class InternalTests(unittest.TestCase): self.assertEqual(substfunc(cmd, d), inputs + cmd[2:]) # Many inputs, can't use @INPUT@ like this cmd = ['@INPUT@.out', 'ordinary', 'strings'] + self.assertRaises(ME, substfunc, cmd, d) # Not enough inputs cmd = ['@INPUT2@.out', 'ordinary', 'strings'] self.assertRaises(ME, substfunc, cmd, d) @@ -281,6 +285,7 @@ class InternalTests(unittest.TestCase): self.assertEqual(substfunc(cmd, d), [outputs[0] + '.out', inputs[1] + '.ok'] + cmd[2:]) # Many inputs, can't use @INPUT@ like this cmd = ['@INPUT@.out', 'ordinary', 'strings'] + self.assertRaises(ME, substfunc, cmd, d) # Not enough inputs cmd = ['@INPUT2@.out', 'ordinary', 'strings'] self.assertRaises(ME, substfunc, cmd, d) @@ -307,6 +312,7 @@ class InternalTests(unittest.TestCase): self.assertEqual(substfunc(cmd, d), [outputs[0] + '.out', inputs[1] + '.ok', 'dir']) # Many inputs, can't use @INPUT@ like this cmd = ['@INPUT@.out', 'ordinary', 'strings'] + self.assertRaises(ME, substfunc, cmd, d) # Not enough inputs cmd = ['@INPUT2@.out', 'ordinary', 'strings'] self.assertRaises(ME, substfunc, cmd, d) @@ -853,7 +859,6 @@ class AllPlatformTests(BasePlatformTests): env = Environment(testdir, self.builddir, self.meson_command, get_fake_options(self.prefix), []) for lang, evar in langs: - evalue = None # Detect with evar and do sanity checks on that if evar in os.environ: ecc = getattr(env, 'detect_{}_compiler'.format(lang))(False) |