summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJoannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>2019-09-12 09:02:59 (GMT)
committerStéphane Wirtel <stephane@wirtel.be>2019-09-12 09:02:59 (GMT)
commit92777d5e5aed1753bafe07265dbe98b2d271815b (patch)
treea609553e4f137751da0e2624372e9b96e4f79d4e /Lib
parenta06d683d7fd88721eaf59abcf5b02eb82045c7b1 (diff)
downloadcpython-92777d5e5aed1753bafe07265dbe98b2d271815b.zip
cpython-92777d5e5aed1753bafe07265dbe98b2d271815b.tar.gz
cpython-92777d5e5aed1753bafe07265dbe98b2d271815b.tar.bz2
bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper (GH-15168)
Rename and document test.bytecode_helper as test.support.bytecode_helper
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/support/bytecode_helper.py (renamed from Lib/test/bytecode_helper.py)4
-rw-r--r--Lib/test/test_dis.py2
-rw-r--r--Lib/test/test_peepholer.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/bytecode_helper.py b/Lib/test/support/bytecode_helper.py
index 347d603..348e277 100644
--- a/Lib/test/bytecode_helper.py
+++ b/Lib/test/support/bytecode_helper.py
@@ -15,7 +15,7 @@ class BytecodeTestCase(unittest.TestCase):
return s.getvalue()
def assertInBytecode(self, x, opname, argval=_UNSPECIFIED):
- """Returns instr if op is found, otherwise throws AssertionError"""
+ """Returns instr if opname is found, otherwise throws AssertionError"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
if argval is _UNSPECIFIED or instr.argval == argval:
@@ -29,7 +29,7 @@ class BytecodeTestCase(unittest.TestCase):
self.fail(msg)
def assertNotInBytecode(self, x, opname, argval=_UNSPECIFIED):
- """Throws AssertionError if op is found"""
+ """Throws AssertionError if opname is found"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
disassembly = self.get_disassembly_as_string(x)
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py
index 11f97e6..fecf203 100644
--- a/Lib/test/test_dis.py
+++ b/Lib/test/test_dis.py
@@ -1,7 +1,7 @@
# Minimal tests for dis module
from test.support import captured_stdout
-from test.bytecode_helper import BytecodeTestCase
+from test.support.bytecode_helper import BytecodeTestCase
import unittest
import sys
import dis
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index c90a532..47dee33 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -1,7 +1,7 @@
import dis
import unittest
-from test.bytecode_helper import BytecodeTestCase
+from test.support.bytecode_helper import BytecodeTestCase
def count_instr_recursively(f, opname):