Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2025

Language: Python

Description

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.

You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. Nor do you need a fancy computer; every problem has a solution that completes in at most 15 seconds on ten-year-old hardware.
Source: Advent of Code Github Topic

Day 01
Day 02
Day 03
Day 04
Day 05
Day 06
Day 07
Day 08
Day 09
Day 10
Day 11
Day 12

Keywords: aoc adventofcode

UV

  • uv init .
  • uv tool install ruff

Pytest

  • uv run pytest

  • uv run pytest tests/test_name_of_test.py

  • constraints for test

    1. Write a pytest test suite following these specific rules.
    2. Never use f-strings directly as arguments to error constructors like pytest.fail().
    3. F-strings are permitted when assigned to variables first, then passed to error constructors.
    4. Use type hints where appropriate throughout the code.
    5. Only use built-in type hinting (no imports from typing module). Exceptions require explicit approval.
    6. Absolutely no assert statements - use pytest.fail() with error messages instead.
    7. All test method docstrings must have their first line ending with a period.
    8. Pay special attention to f-string usage (rules 2-3) and type hinting restrictions (rules 4-5).
    9. Use a test class structure with fixtures as shown in the example.
    ```python
    from my_class_module import Solution
    
    class MyTestClass:
      @pytest.fixture
      def solution(self) -> Solution:
        """Return a Solution instance for testing."""
        return Solution()
    ```
    
    1. The method being tested must literally be named function_under_test when called.
    ```python
    def my_test_1(self, solution: Solution) -> None
      solution.function_under_test()
    ```
    
    1. Import the Solution class from "my_class_module" as specified.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages