Skip to content

Commit 05b7132

Browse files
committed
pytest module and their definitions are renamed.
1 parent 4e75513 commit 05b7132

File tree

201 files changed

+274
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+274
-212
lines changed

tests/Makefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
.PHONY: clean
2-
clean:
3-
rm -rf *.pyc __pycache__ parsetab.py *.out tmp.v uut.vcd
4-
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make clean -C {}
1+
PYTHON=python3
2+
#PYTHON=python
3+
4+
.PHONY: all
5+
all: clean
56

67
.PHONY: test
78
test:
8-
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make test -C {}
9+
$(PYTHON) -m pytest -vv
10+
11+
.PHONY: run
12+
run:
13+
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make run -C {}
14+
15+
.PHONY: clean
16+
clean:
17+
rm -rf *.pyc __pycache__ parsetab.py *.out .cache
18+
find . -maxdepth 1 -type d |grep "./" | xargs -I {} make clean -C {}

tests/case/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
TARGET=led.py
2-
TEST=test_led.py
1+
TARGET=*.py
32
ARGS=
43

54
PYTHON=python3
@@ -17,7 +16,7 @@ run:
1716

1817
.PHONY: test
1918
test:
20-
$(PYTHON) -m pytest -vv $(TEST)
19+
$(PYTHON) -m pytest -vv
2120

2221
.PHONY: check
2322
check:
@@ -27,4 +26,4 @@ check:
2726

2827
.PHONY: clean
2928
clean:
30-
rm -rf *.pyc __pycache__ parsetab.py *.out
29+
rm -rf *.pyc __pycache__ parsetab.py *.out tmp.v uut.vcd

tests/case/led.py renamed to tests/case/case.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import sys
22
import os
33

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

69
def mkLed():

tests/case/test_led.py renamed to tests/case/test_case.py

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

33
expected_verilog = """
44
module blinkled #
@@ -29,9 +29,9 @@
2929
endmodule
3030
"""
3131

32-
def test_led():
33-
led_module = led.mkLed()
34-
led_code = led_module.to_verilog()
32+
def test():
33+
test_module = case.mkLed()
34+
code = test_module.to_verilog()
3535

3636
from pyverilog.vparser.parser import VerilogParser
3737
from pyverilog.ast_code_generator.codegen import ASTCodeGenerator
@@ -40,4 +40,4 @@ def test_led():
4040
codegen = ASTCodeGenerator()
4141
expected_code = codegen.visit(expected_ast)
4242

43-
assert(expected_code == led_code)
43+
assert(expected_code == code)

tests/case/veriloggen

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/cat/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
TARGET=led.py
2-
TEST=test_led.py
1+
TARGET=*.py
32
ARGS=
43

54
PYTHON=python3
@@ -17,7 +16,7 @@ run:
1716

1817
.PHONY: test
1918
test:
20-
$(PYTHON) -m pytest -vv $(TEST)
19+
$(PYTHON) -m pytest -vv
2120

2221
.PHONY: check
2322
check:
@@ -27,4 +26,4 @@ check:
2726

2827
.PHONY: clean
2928
clean:
30-
rm -rf *.pyc __pycache__ parsetab.py *.out
29+
rm -rf *.pyc __pycache__ parsetab.py *.out tmp.v uut.vcd
File renamed without changes.
File renamed without changes.

tests/cat/veriloggen

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/class/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
TARGET=led.py
2-
TEST=test_led.py
1+
TARGET=*.py
32
ARGS=
43

54
PYTHON=python3
@@ -17,7 +16,7 @@ run:
1716

1817
.PHONY: test
1918
test:
20-
$(PYTHON) -m pytest -vv $(TEST)
19+
$(PYTHON) -m pytest -vv
2120

2221
.PHONY: check
2322
check:
@@ -27,4 +26,4 @@ check:
2726

2827
.PHONY: clean
2928
clean:
30-
rm -rf *.pyc __pycache__ parsetab.py *.out
29+
rm -rf *.pyc __pycache__ parsetab.py *.out tmp.v uut.vcd

0 commit comments

Comments
 (0)