From 2815a7435d33d6a8253019f0941db354b87b2433 Mon Sep 17 00:00:00 2001 From: JINMO-PARK Date: Fri, 30 May 2025 13:46:25 +0900 Subject: [PATCH 1/3] Create main.yml test_pjm --- .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..0e035e7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Python CI with pytest + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests with pytest + run: | + pytest test_car.py From bf2200894ac6f9ca7dff5effc4efc6cf474b50a3 Mon Sep 17 00:00:00 2001 From: JINMO-PARK Date: Fri, 30 May 2025 13:42:26 +0900 Subject: [PATCH 2/3] Changed car.py with faulty line --- car.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/car.py b/car.py index 09f0c46..3f7ffc4 100644 --- a/car.py +++ b/car.py @@ -11,7 +11,7 @@ def change_speed(self, change): else: self.speed += change else: - self.speed += change + self.speed += 1#change self.step() From 7b8f1969da9087a8b9ada424467f243231c397d8 Mon Sep 17 00:00:00 2001 From: JINMO-PARK Date: Fri, 30 May 2025 20:45:28 +0900 Subject: [PATCH 3/3] Update car.py --- car.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/car.py b/car.py index 3f7ffc4..2663741 100644 --- a/car.py +++ b/car.py @@ -11,7 +11,7 @@ def change_speed(self, change): else: self.speed += change else: - self.speed += 1#change + self.speed += change self.step() @@ -26,4 +26,4 @@ def average_speed(self): if self.time == 0: raise Exception("Divide by 0! Car did not move!") else: - return self.odometer / self.time \ No newline at end of file + return self.odometer / self.time