1
0

Added tests
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 29s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 21s

This commit is contained in:
Jon Michael Aanes 2024-10-26 13:01:56 +02:00
parent 0b69ea388a
commit 7e4ca53024
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
2 changed files with 11 additions and 5 deletions

5
test/test_init.py Normal file
View File

@ -0,0 +1,5 @@
from infernal_interpreter import __version__
def test_init():
assert __version__ is not None

View File

@ -1,11 +1,10 @@
import os
import sys
import traceback
import logging
import traceback
import pytest
from infernal_interpreter.Emulator import CodeParseException, Emulator
from infernal_interpreter.Junk import JunkComparisonException
from infernal_interpreter.Emulator import Emulator, CodeParseException
logger = logging.getLogger(__name__)
@ -13,6 +12,7 @@ logger = logging.getLogger(__name__)
code_tests = []
def add_test(name, result, register, code):
code_tests.append((name, result, register, code))
@ -179,7 +179,8 @@ start: movq $100, %rsp # Set stack pointer to a random position.
################################################################################
@pytest.mark.parametrize("name,result,register,code", code_tests)
@pytest.mark.parametrize('name,result,register,code', code_tests)
def test_execution(name, result, register, code):
line_nr = None
try: