Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests #99

Merged
merged 4 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/check-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with mypy
pip install -r requirements-dev.txt
- name: Analyze with mypy
run: |
pip install mypy
mypy ./src/main/python
- name: Test with flake8
- name: Lint with flake8
run: |
pip install flake8
flake8 ./src/main/python --ignore B011,E203,E501,E722,E731,W503,SIM119,SIM106
- name: Test with pytest
run: |
pytest
58 changes: 0 additions & 58 deletions dummy.json

This file was deleted.

1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[pytest]
pythonpath = src/main/python
testpaths =
tests
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements.txt
flake8>=7.1.0
mypy>=1.11.0
pytest>=8.3.1
58 changes: 0 additions & 58 deletions save_data1.json

This file was deleted.

41 changes: 0 additions & 41 deletions save_data2.json

This file was deleted.

41 changes: 0 additions & 41 deletions save_data3.json

This file was deleted.

8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


@pytest.fixture
def save_data():
filepath = 'tests/sample.sav'
with open(filepath, 'rb') as f:
return f.read()
50 changes: 0 additions & 50 deletions tests/create test data.py

This file was deleted.

41 changes: 0 additions & 41 deletions tests/no_perk_points_data.json

This file was deleted.

Binary file removed tests/no_perk_points_post.sav
Binary file not shown.
Binary file removed tests/no_perk_points_pre.sav
Binary file not shown.
44 changes: 0 additions & 44 deletions tests/old tests.txt

This file was deleted.

Binary file added tests/sample.sav
Binary file not shown.
Binary file removed tests/sample_save1.sav
Binary file not shown.
Binary file removed tests/sample_save2.sav
Binary file not shown.
Binary file removed tests/sample_save3.sav
Binary file not shown.
Loading
Loading