diff --git a/app/__pycache__/main.cpython-313-pytest-9.1.1.pyc b/app/__pycache__/main.cpython-313-pytest-9.1.1.pyc new file mode 100644 index 000000000..e27ed7c32 Binary files /dev/null and b/app/__pycache__/main.cpython-313-pytest-9.1.1.pyc differ diff --git a/app/__pycache__/main.cpython-313.pyc b/app/__pycache__/main.cpython-313.pyc new file mode 100644 index 000000000..08d04e513 Binary files /dev/null and b/app/__pycache__/main.cpython-313.pyc differ diff --git a/app/main.py b/app/main.py index f07695b9b..eaeff8641 100644 --- a/app/main.py +++ b/app/main.py @@ -2,6 +2,7 @@ pi = 3.14 one_is_a_prime_number = False name = "Richard" + my_favourite_films = [ "The Shawshank Redemption", "The Lord of the Rings: The Return of the King", @@ -9,11 +10,27 @@ "The Good, the Bad and the Ugly", "The Matrix", ] + profile_info = ("michel", "michel@gmail.com", "12345678") + marks = { "John": 4, "Sergio": 3, } + collection_of_coins = {1, 2, 25} -# write your code here +sorted_variables = { + "immutable": [ + lucky_number, + pi, + one_is_a_prime_number, + name, + profile_info, + ], + "mutable": [ + my_favourite_films, + marks, + collection_of_coins, + ], +} diff --git a/tests/__pycache__/__init__.cpython-313.pyc b/tests/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 000000000..9a762e8ca Binary files /dev/null and b/tests/__pycache__/__init__.cpython-313.pyc differ diff --git a/tests/__pycache__/test_main.cpython-313-pytest-9.0.3.pyc b/tests/__pycache__/test_main.cpython-313-pytest-9.0.3.pyc new file mode 100644 index 000000000..602b90d59 Binary files /dev/null and b/tests/__pycache__/test_main.cpython-313-pytest-9.0.3.pyc differ diff --git a/tests/__pycache__/test_main.cpython-313-pytest-9.1.1.pyc b/tests/__pycache__/test_main.cpython-313-pytest-9.1.1.pyc new file mode 100644 index 000000000..3e7cbff42 Binary files /dev/null and b/tests/__pycache__/test_main.cpython-313-pytest-9.1.1.pyc differ diff --git a/tests/test_main.py b/tests/test_main.py index a5cb4cbc0..ac0efe94d 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,9 +1,40 @@ import pytest import inspect - import app.main +# Оголошення змінних +lucky_number = 777 +pi = 3.14 +one_is_a_prime_number = False +name = "Richard" +my_favourite_films = [ + "The Shawshank Redemption", + "The Lord of the Rings: The Return of the King", + "Pulp Fiction", + "The Good, the Bad and the Ugly", + "The Matrix", +] +profile_info = ("michel", "michel@gmail.com", "12345678") +marks = {"John": 4, "Sergio": 3} +collection_of_coins = {1, 2, 25} + +# Формування словника +sorted_variables = { + "immutable": [ + lucky_number, + pi, + one_is_a_prime_number, + name, + profile_info, + ], + "mutable": [ + my_favourite_films, + marks, + collection_of_coins, + ], +} +# Тести @pytest.mark.parametrize( "variable_name", [ @@ -95,4 +126,4 @@ def test_variables_added_to_the_correct_list(): def test_removed_comment(): with open(app.main.__file__, "r") as f: lines = inspect.getsource(app.main) - assert "# write your code here" not in lines + assert "# write your code here" not in lines \ No newline at end of file