Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemanspiff2007 committed Oct 15, 2024
1 parent 4008001 commit d86f379
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions tests/test_code_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ def test_err_13(monkeypatch, utf8) -> None:

msg = e.value.pformat()

print('-' * 80)
print('-' * 80)
for line in msg:
print(line)
print('-' * 80)
print('-' * 80)

assert msg == [
" print('Line1')",
" print('Line2')",
Expand All @@ -96,28 +89,6 @@ def test_err_13(monkeypatch, utf8) -> None:
]


@pytest.mark.parametrize('utf8', [True, False])
@pytest.mark.usefixtures('_setup_env')
def test_err(monkeypatch, utf8) -> None:
monkeypatch.setattr(SET_UTF8_ENCODING, '_value', utf8)

code = "print('Line1')\nprint('Line2')\n1/0"

with pytest.raises(CodeExceptionError) as e:
execute_code(code, Path('/my_file'), 5)

msg = e.value.pformat()
assert msg == [
" print('Line1')",
" print('Line2')",
' 1/0 <--',
'',
'Traceback (most recent call last):',
' File "my_file", line 7',
'ZeroDivisionError: division by zero'
]


IS_WIN = os.name == 'nt'


Expand Down

0 comments on commit d86f379

Please sign in to comment.