diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bea00c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Python bytecode +__pycache__/ +*.pyc + +# Distribution / packaging +dist/ +build/ +*.egg-info/ diff --git a/__pycache__/test_hello.cpython-313.pyc b/__pycache__/test_hello.cpython-313.pyc index d314afb..c8ca965 100644 Binary files a/__pycache__/test_hello.cpython-313.pyc and b/__pycache__/test_hello.cpython-313.pyc differ diff --git a/test_hello.py b/test_hello.py index a04d2ce..9af6592 100644 --- a/test_hello.py +++ b/test_hello.py @@ -1,5 +1,6 @@ import subprocess import unittest +from pathlib import Path class TestHello(unittest.TestCase): @@ -9,7 +10,7 @@ class TestHello(unittest.TestCase): ["python3", "hello.py"], capture_output=True, text=True, - cwd="/workspace" + cwd=Path(__file__).parent ) self.assertEqual(result.returncode, 0) self.assertIn("Hello, World!", result.stdout) @@ -20,7 +21,7 @@ class TestHello(unittest.TestCase): ["python3", "hello.py"], capture_output=True, text=True, - cwd="/workspace" + cwd=Path(__file__).parent ) self.assertEqual(result.stderr, "")