Write a simple python hello world #5

Open
coding-agent wants to merge 5 commits from agent-pr/write-a-simple-python-hello-wo into main
3 changed files with 11 additions and 2 deletions
Showing only changes of commit b375bc09e2 - Show all commits
+8
View File
@@ -0,0 +1,8 @@
# Python bytecode
__pycache__/
*.pyc
# Distribution / packaging
dist/
build/
*.egg-info/
Binary file not shown.
+3 -2
View File
@@ -1,5 +1,6 @@
import subprocess import subprocess
import unittest import unittest
from pathlib import Path
class TestHello(unittest.TestCase): class TestHello(unittest.TestCase):
@@ -9,7 +10,7 @@ class TestHello(unittest.TestCase):
["python3", "hello.py"], ["python3", "hello.py"],
capture_output=True, capture_output=True,
text=True, text=True,
cwd="/workspace" cwd=Path(__file__).parent
) )
self.assertEqual(result.returncode, 0) self.assertEqual(result.returncode, 0)
self.assertIn("Hello, World!", result.stdout) self.assertIn("Hello, World!", result.stdout)
@@ -20,7 +21,7 @@ class TestHello(unittest.TestCase):
["python3", "hello.py"], ["python3", "hello.py"],
capture_output=True, capture_output=True,
text=True, text=True,
cwd="/workspace" cwd=Path(__file__).parent
) )
self.assertEqual(result.stderr, "") self.assertEqual(result.stderr, "")