From 12f16c3165b85a5005efa12838e2de11e54f89aa Mon Sep 17 00:00:00 2001 From: corentinlger Date: Tue, 23 Jan 2024 16:24:05 +0100 Subject: [PATCH] Update files for testing --- .github/workflows/python-app.yml | 1 + requirements.txt | 4 ++++ tets_black.py => test_black.py | 0 test_pytest.py | 14 ++++++++++++++ 4 files changed, 19 insertions(+) rename tets_black.py => test_black.py (100%) create mode 100644 test_pytest.py diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 058db01..e656a78 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,6 +27,7 @@ jobs: run: | python -m pip install --upgrade pip pip install black + pip install pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with black run: | diff --git a/requirements.txt b/requirements.txt index c7a6ab8..af726a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,10 @@ black==23.12.1 click==8.1.7 contourpy==1.2.0 cycler==0.12.1 +exceptiongroup==1.2.0 fonttools==4.47.2 hydra-core==1.3.2 +iniconfig==2.0.0 jax==0.4.23 jaxlib==0.4.23 kiwisolver==1.4.5 @@ -18,10 +20,12 @@ packaging==23.2 pathspec==0.12.1 pillow==10.2.0 platformdirs==4.1.0 +pluggy==1.3.0 pyparsing==3.1.1 PyQt5==5.15.10 PyQt5-Qt5==5.15.2 PyQt5-sip==12.13.0 +pytest==7.4.4 python-dateutil==2.8.2 PyYAML==6.0.1 scipy==1.12.0 diff --git a/tets_black.py b/test_black.py similarity index 100% rename from tets_black.py rename to test_black.py diff --git a/test_pytest.py b/test_pytest.py new file mode 100644 index 0000000..56165b8 --- /dev/null +++ b/test_pytest.py @@ -0,0 +1,14 @@ +# test_assert_examples.py + +def test_uppercase(): + assert "loud noises".upper() == "LOUD NOISES" + +def test_reversed(): + assert list(reversed([1, 2, 3, 4])) == [4, 3, 2, 1] + +def test_some_primes(): + assert 37 in { + num + for num in range(2, 50) + if not any(num % div == 0 for div in range(2, num)) + } \ No newline at end of file