|
32 | 32 | " assert x.imag == 3.14\n",
|
33 | 33 | " assert x.real == 0.0\n",
|
34 | 34 | "\n",
|
| 35 | + "\n", |
35 | 36 | "def test_string_literals():\n",
|
36 | 37 | " string_1 = 'Hello, world!'\n",
|
37 | 38 | " string_2 = \"Python programming\"\n",
|
38 | 39 | " string_3 = '''This is a\n",
|
39 |
| - " multi-line string.'''\n", |
| 40 | + "multi-line string.''' # Adjusted indentation for consistency\n", |
40 | 41 | " string_4 = \"\"\"This is another\n",
|
41 |
| - " multi-line string.\"\"\"\n", |
| 42 | + "multi-line string.\"\"\" # Adjusted indentation for consistency\n", |
42 | 43 | " string_5 = \"This is a newline:\\nAnd this is a tab:\\tHello\"\n",
|
43 | 44 | " string_6 = r\"C:\\Users\\Name\\Folder\"\n",
|
44 | 45 | " name = \"Alice\"\n",
|
|
62 | 63 | " byte_values = [byte for byte in string_9]\n",
|
63 | 64 | " assert byte_values == expected_bytes\n",
|
64 | 65 | "\n",
|
| 66 | + "\n", |
65 | 67 | "def test_boolean_literals():\n",
|
66 | 68 | " a = True + 4\n",
|
67 | 69 | " b = False + 10\n",
|
68 | 70 | "\n",
|
69 | 71 | " assert a == 5\n",
|
70 | 72 | " assert b == 10\n",
|
71 | 73 | "\n",
|
| 74 | + "\n", |
72 | 75 | "def test_special_literal():\n",
|
73 | 76 | " a = None\n",
|
74 | 77 | " assert a is None\n",
|
75 | 78 | "\n",
|
| 79 | + "\n", |
76 | 80 | "# Mocking user input to test the input function\n",
|
77 | 81 | "@patch('builtins.input', return_value='5') # Mocking input to return '5' when called\n",
|
78 | 82 | "def test_input_function(mock_input):\n",
|
|
0 commit comments