Skip to content

Commit 8f1c198

Browse files
Respond to feedback
As title.
1 parent 2eacea6 commit 8f1c198

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎numba/tests/support.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ def subprocess_test_runner(self, test_module, test_class=None,
547547
f'captured stderr: {status.stderr}')
548548
self.assertEqual(status.returncode, 0, streams)
549549
self.assertIn('OK', status.stderr)
550-
self.assertTrue('FAIL' not in status.stderr)
551-
self.assertTrue('ERROR' not in status.stderr)
550+
self.assertNotIn('FAIL', status.stderr)
551+
self.assertNotIn('ERROR', status.stderr)
552552

553553

554554
class SerialMixin(object):

‎numba/tests/test_debuginfo.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
import unittest
88
import llvmlite.binding as llvm
99

10+
#NOTE: These tests are potentially sensitive to changes in SSA or lowering
11+
# behaviour and may need updating should changes be made to the corresponding
12+
# algorithms.
13+
1014

1115
class TestDebugInfo(TestCase):
1216
"""
@@ -295,14 +299,14 @@ def foo(a):
295299
sig = (types.float64[::1],)
296300
full_ir = self._get_llvmir(foo, sig=sig)
297301

298-
# make sure decref lines end with `meminfo.<number>)`.
302+
# make sure decref lines end with `meminfo.<number>)` without !dbg info.
299303
count = 0
300304
for line in full_ir.splitlines():
301305
line_stripped = line.strip()
302306
if line_stripped.startswith('call void @NRT_decref'):
303307
self.assertRegex(line, r'.*meminfo\.[0-9]+\)$')
304308
count += 1
305-
self.assertTrue(count > 0) # make sure there were some decrefs!
309+
self.assertGreater(count, 0) # make sure there were some decrefs!
306310

307311
def test_DILocation_decref(self):
308312
# Test runner for test_DILocation_decref_impl, needs a subprocess

‎numba/tests/test_parfors.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
from numba.tests.support import (TestCase, captured_stdout, MemoryLeakMixin,
4444
override_env_config, linux_only, tag,
4545
skip_parfors_unsupported, _32bit, needs_blas,
46-
needs_lapack, disabled_test, skip_unless_scipy)
46+
needs_lapack, disabled_test, skip_unless_scipy,
47+
needs_subprocess)
4748
import cmath
4849
import unittest
4950

@@ -52,9 +53,8 @@
5253
# used to determine whether a test is skipped or not, such that if you want to
5354
# run any parfors test directly this environment variable can be set. The
5455
# subprocesses running the test classes set this environment variable as the new
55-
# process starts which enables the tests within the process.
56-
_exec_cond = os.environ.get('SUBPROC_TEST', None) == '1'
57-
needs_subprocess = unittest.skipUnless(_exec_cond, "needs subprocess harness")
56+
# process starts which enables the tests within the process. The decorator
57+
# @needs_subprocess is used to ensure the appropriate test skips are made.
5858

5959

6060
@skip_parfors_unsupported

0 commit comments

Comments
 (0)