From 5d05cb10a8335d9a871df970ae8097080032d053 Mon Sep 17 00:00:00 2001 From: RiyaPottapinjara <145230449+RiyaPottapinjara@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:20:22 -0500 Subject: [PATCH 1/6] Update my_code.py --- my_code.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/my_code.py b/my_code.py index dbdeadf..4a64f1e 100644 --- a/my_code.py +++ b/my_code.py @@ -12,3 +12,6 @@ def fix_phone_num(phone_num_to_fix): def test_fix_phone_num(): assert fix_phone_num("5125558823") == '(512) 555 8823' + assert fix_phone_num("5554429876") == '(555) 442 9876' + assert fix_phone_num("3216543333") == '(321) 654 3333' + From abc21e71b7fb7b520db2f0b011c6a1fbe9e9a17a Mon Sep 17 00:00:00 2001 From: RiyaPottapinjara <145230449+RiyaPottapinjara@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:34:43 -0500 Subject: [PATCH 2/6] Update my_code.py --- my_code.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/my_code.py b/my_code.py index 4a64f1e..cebd051 100644 --- a/my_code.py +++ b/my_code.py @@ -15,3 +15,7 @@ def test_fix_phone_num(): assert fix_phone_num("5554429876") == '(555) 442 9876' assert fix_phone_num("3216543333") == '(321) 654 3333' +def fix_dash_paranthesis(): + assert fix_phone_num("555-442-98761") = '(555) 442 9876' + assert fix_phone_num("(321) 654 3333") = '(321) 654 3333' + From cbdef262b2d34ddb5f1f90b6f9e005849d0db872 Mon Sep 17 00:00:00 2001 From: RiyaPottapinjara <145230449+RiyaPottapinjara@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:30:05 -0500 Subject: [PATCH 3/6] Create main.yml --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..320e6df --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Run pytest tests + +on: + pull_request: + branches: [ main ] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + - name: Pytest summary + uses: dariocurr/pytest-summary@v2 + with: + paths: my_code.py + From 221253ab82b63fe1df809dc39f3e68cfbc60625f Mon Sep 17 00:00:00 2001 From: RiyaPottapinjara <145230449+RiyaPottapinjara@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:39:47 -0500 Subject: [PATCH 4/6] Update my_code.py --- my_code.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/my_code.py b/my_code.py index cebd051..1e2aa03 100644 --- a/my_code.py +++ b/my_code.py @@ -11,11 +11,11 @@ def fix_phone_num(phone_num_to_fix): return fixed_num def test_fix_phone_num(): - assert fix_phone_num("5125558823") == '(512) 555 8823' - assert fix_phone_num("5554429876") == '(555) 442 9876' - assert fix_phone_num("3216543333") == '(321) 654 3333' + assert fix_phone_num("5125558823") == '(512) 521 8823' + assert fix_phone_num("5554429876") == '(555) 421 9876' + assert fix_phone_num("3216543333") == '(321) 651 3333' def fix_dash_paranthesis(): - assert fix_phone_num("555-442-98761") = '(555) 442 9876' - assert fix_phone_num("(321) 654 3333") = '(321) 654 3333' + assert fix_phone_num("555-442-98761") = '(555) 422 9876' + assert fix_phone_num("(321) 654 3333") = '(321) 654 3321' From 9670267bee0158c7740c94801b90b9ae56fc4d53 Mon Sep 17 00:00:00 2001 From: RiyaPottapinjara <145230449+RiyaPottapinjara@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:42:21 -0500 Subject: [PATCH 5/6] Update my_code.py --- my_code.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/my_code.py b/my_code.py index 1e2aa03..aed8966 100644 --- a/my_code.py +++ b/my_code.py @@ -11,11 +11,13 @@ def fix_phone_num(phone_num_to_fix): return fixed_num def test_fix_phone_num(): - assert fix_phone_num("5125558823") == '(512) 521 8823' - assert fix_phone_num("5554429876") == '(555) 421 9876' - assert fix_phone_num("3216543333") == '(321) 651 3333' + assert fix_phone_num("5125558823") == '(512) 555 8823' + assert fix_phone_num("5554429876") == '(555) 442 9876' + assert fix_phone_num("3216543333") == '(321) 654 3333' def fix_dash_paranthesis(): - assert fix_phone_num("555-442-98761") = '(555) 422 9876' - assert fix_phone_num("(321) 654 3333") = '(321) 654 3321' + assert fix_phone_num("555-442-98761") = '(555) 442 9876' + assert fix_phone_num("(321) 654 3333") = '(321) 654 3333' + assert 9 = 3 + assert 4 = 8 From 79c6b1f224713a39a32f08a66e8375fbf74f64da Mon Sep 17 00:00:00 2001 From: RiyaPottapinjara <145230449+RiyaPottapinjara@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:47:01 -0500 Subject: [PATCH 6/6] Update my_code.py --- my_code.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/my_code.py b/my_code.py index aed8966..251af5b 100644 --- a/my_code.py +++ b/my_code.py @@ -18,6 +18,8 @@ def test_fix_phone_num(): def fix_dash_paranthesis(): assert fix_phone_num("555-442-98761") = '(555) 442 9876' assert fix_phone_num("(321) 654 3333") = '(321) 654 3333' - assert 9 = 3 - assert 4 = 8 + assert 9 < 3 + assert 4 > 8 + assert True == False +