diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 0209620..b6b5018 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -74,7 +74,7 @@ jobs: - uses: ./.github/actions/setup-python - name: UnitTest working-directory: ./python - run: python -m unittest discover ./test + run: pytest mypy: timeout-minutes: 10 runs-on: ubuntu-latest diff --git a/python/README.md b/python/README.md index 0d5e5b2..c38f54b 100644 --- a/python/README.md +++ b/python/README.md @@ -2,10 +2,15 @@ - Python 3.14.4 -## 2. Execution +## 2. Install Libraries via requirements.txt + +```command +$ pip install -r requirements.txt +``` + +## 3. Execution ```command -$ cd ./python $ python main.py Provide the directory name you put the JSON file in: ../json Provide the filename of which JSON data name you would like to sort: settings.json @@ -13,3 +18,17 @@ Provide asc(default) or desc you would like to sort key-value in: asc Start exporting JSON data in ./json/settings.json Done exporting JSON data in ./json/settings.json 🎉 ``` + +## 4. Unit Test + +```command +$ pytest +============================= test session starts ============================== +platform linux -- Python 3.14.4, pytest-9.0.3, pluggy-1.6.0 +rootdir: /mnt/c/Users/binlh/Documents/development/json-data-sorters/python +collected 5 items + +test/test_application.py ..... [100%] + +============================== 5 passed in 0.26s =============================== +```