mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-30 19:51:15 +00:00
Run pytest in CI
This commit is contained in:
parent
a1271f56d5
commit
6e93401128
36
.github/workflows/unittest.yml
vendored
Normal file
36
.github/workflows/unittest.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Unit Tests
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pytest-win:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install python libraries
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pip install pytest -r tools/requirements.txt
|
||||||
|
|
||||||
|
- name: Run python unit tests (Windows)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pytest tools/isledecomp
|
||||||
|
|
||||||
|
pytest-ubuntu:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install python libraries
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pip install pytest -r tools/requirements.txt
|
||||||
|
|
||||||
|
- name: Run python unit tests (Ubuntu)
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pytest tools/isledecomp
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
from typing import Optional
|
||||||
import pytest
|
import pytest
|
||||||
from isledecomp.parser.parser import (
|
from isledecomp.parser.parser import (
|
||||||
ReaderState as _rs,
|
ReaderState as _rs,
|
||||||
@ -70,7 +71,7 @@
|
|||||||
"state, marker_type, new_state, expected_error", state_change_marker_cases
|
"state, marker_type, new_state, expected_error", state_change_marker_cases
|
||||||
)
|
)
|
||||||
def test_state_change_by_marker(
|
def test_state_change_by_marker(
|
||||||
state: _rs, marker_type: str, new_state: _rs, expected_error: None | _pe
|
state: _rs, marker_type: str, new_state: _rs, expected_error: Optional[_pe]
|
||||||
):
|
):
|
||||||
p = DecompParser()
|
p = DecompParser()
|
||||||
p.state = state
|
p.state = state
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user