1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00

corrected (with Henry's help) to run with Python 3.x

This commit is contained in:
Josy Boelen 2018-12-05 19:26:21 +01:00
parent 43e4190a6a
commit 1c074e8e6f

View File

@ -52,6 +52,7 @@ def invalid_import_keyword(input_sig, output_sig):
return do_something, something_else
"""
@block
def invalid_signal_underscore(input_sig, output_sig):
_foo = Signal(False)
@ -66,6 +67,7 @@ def invalid_signal_underscore(input_sig, output_sig):
return do_something, something_else
@block
def invalid_function_underscore(clock, input_sig, output_sig):
@ -76,7 +78,6 @@ def invalid_function_underscore(clock, input_sig, output_sig):
return do_something
@block
def valid(input_sig, output_sig):
@ -86,6 +87,7 @@ def valid(input_sig, output_sig):
return do_something
def test_multiple_conversion():
sig_1 = Signal(True)
sig_2 = Signal(True)
@ -117,7 +119,7 @@ def test_invalid_keyword_name():
fd, full_filename = tempfile.mkstemp(
suffix='.py', dir=temp_directory)
os.write(fd, keyword_template.substitute(keyword=keyword))
os.write(fd, keyword_template.substitute(keyword=keyword).encode('utf-8'))
os.close(fd)
module_name = os.path.basename(full_filename)[:-3] # chop off .py
@ -132,6 +134,7 @@ def test_invalid_keyword_name():
sys.path.pop()
shutil.rmtree(temp_directory)
def test_invalid_signal_underscore_name():
sig_1 = Signal(True)
sig_2 = Signal(True)
@ -142,6 +145,7 @@ def test_invalid_signal_underscore_name():
with pytest.warns(ToVHDLWarning):
a_block.convert(hdl='VHDL')
def test_invalid_function_underscore_name():
sig_1 = Signal(True)
sig_2 = Signal(True)