1010
1111class TestGreet :
1212 """Tests for the greet function."""
13-
13+
1414 def test_greet_default (self ):
1515 """Test greet with default argument."""
1616 result = greet ()
1717 assert result == "Hello, World!"
18-
18+
1919 def test_greet_with_name (self ):
2020 """Test greet with custom name."""
2121 result = greet ("Python" )
2222 assert result == "Hello, Python!"
23-
23+
2424 def test_greet_empty_string (self ):
2525 """Test greet with empty string."""
2626 result = greet ("" )
2727 assert result == "Hello, !"
28-
29- @pytest .mark .parametrize ("name,expected" , [
30- ("Alice" , "Hello, Alice!" ),
31- ("Bob" , "Hello, Bob!" ),
32- ("123" , "Hello, 123!" ),
33- ("🐍" , "Hello, 🐍!" ),
34- ])
28+
29+ @pytest .mark .parametrize (
30+ "name,expected" ,
31+ [
32+ ("Alice" , "Hello, Alice!" ),
33+ ("Bob" , "Hello, Bob!" ),
34+ ("123" , "Hello, 123!" ),
35+ ("🐍" , "Hello, 🐍!" ),
36+ ],
37+ )
3538 def test_greet_parametrized (self , name , expected ):
3639 """Test greet with multiple inputs using parametrize."""
3740 assert greet (name ) == expected
3841
3942
4043class TestMain :
4144 """Tests for the main function."""
42-
45+
4346 def test_main_runs_without_error (self , capsys ):
4447 """Test that main function runs without raising exceptions."""
4548 from src .main import main
46-
49+
4750 main ()
48-
51+
4952 # Capture output
5053 captured = capsys .readouterr ()
51-
54+
5255 # Check that something was printed
5356 assert "Your UV project is running" in captured .out
54- assert "Hello, World!" in captured .out
57+ assert "Hello, World!" in captured .out
0 commit comments