Skip to content

Commit 2e11594

Browse files
committed
stub_ test is updated. while and class are renamed with underscore.
1 parent 9ec6cc8 commit 2e11594

File tree

11 files changed

+16
-10
lines changed

11 files changed

+16
-10
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/stub_/class/stub_class.py renamed to tests/stub_/_class/stub__class.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import os
33
import collections
44

5+
# the next line can be removed after installation
6+
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
7+
58
from veriloggen import *
69

710
def mkLed():

tests/stub_/class/test_stub_class.py renamed to tests/stub_/_class/test_stub__class.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import led
1+
import stub__class
22

33
expected_verilog = """
44
module top #
@@ -23,9 +23,9 @@
2323
endmodule
2424
"""
2525

26-
def test_led():
27-
top_module = led.mkTop()
28-
top_code = top_module.to_verilog()
26+
def test():
27+
test_module = stub__class.mkTop()
28+
code = test_module.to_verilog()
2929

3030
from pyverilog.vparser.parser import VerilogParser
3131
from pyverilog.ast_code_generator.codegen import ASTCodeGenerator
@@ -34,4 +34,4 @@ def test_led():
3434
codegen = ASTCodeGenerator()
3535
expected_code = codegen.visit(expected_ast)
3636

37-
assert(expected_code == top_code)
37+
assert(expected_code == code)

tests/stub_/str/stub_str.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import os
33
import collections
44

5+
# the next line can be removed after installation
6+
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
7+
58
from veriloggen import *
69

710
def mkLed():

0 commit comments

Comments
 (0)