Topic 5
42 items

Python + Pytest

Depth ceilingFull OOP/decorators/generators + deep Pytest; DSA ONLY Easy→comfortable-Medium (0/90 JDs ask Hard). STOP before LeetCode Hard/DP, metaclasses, CPython internals.

25 MUST · 14 SHOULD · 2 STRETCH · 1 SKIP

not started · 0 written · 42 not started

Python core
not started0/16
  1. MUSTExplain
    Generators & yield (lazy eval, memory, generator vs list)

    Explain lazy iterators because pytest fixtures use yield for teardown.

    Asked 'What is a generator / yield? Generator vs list — memory?' / 'Why does a fixture use yield?'

    named in the job descriptions

  2. MUSTExplain
    Mutable vs immutable, pass-by-object-ref, deep/shallow copy, is vs ==, mutable-default bug

    Explain Python's object model to avoid the classic bugs interviewers plant.

    Asked 'What does def f(a, b=[]) do across calls?' / 'is vs ==?' / 'deep vs shallow copy?'

    named in the job descriptions

  3. MUSTApply
    OOP advanced (dunders, @property, class vs static vs instance methods)

    Use special methods and method types correctly and explain the difference.

    Asked '@staticmethod vs @classmethod vs instance method?' / 'What is __repr__ vs __str__?' / 'Write a class usable in a with-block.'

    named in the job descriptions

  4. MUSTApply
    Comprehensions, enumerate/zip, unpacking, slicing

    Write idiomatic Python fluently under time pressure.

    Asked Expected fluency baked into every live coding task; 'rewrite this loop as a comprehension'

    asked in interviews, not named in any job description

  5. MUSTApply
    Exceptions (try/except/else/finally, custom exceptions, raising, chaining)

    Reason about failure paths and design clean error handling in tests/framework.

    Asked 'Difference between else and finally?' / 'How do you make a custom exception?' / 'How do you assert an exception is raised?' (links to pytest.raises)

    asked in interviews, not named in any job description

  6. MUSTApply
    File / JSON / CSV handling

    Load, parse and assert on structured test data.

    Asked 'How do you read test data from a JSON/CSV?' / 'Parse this API response and assert a nested field.'

    named in the job descriptions

  7. MUSTBuild
    Decorators (write from scratch, functools.wraps, decorator with args)

    Write a decorator live because pytest markers/fixtures ARE decorators.

    Asked 'What is a decorator? Write one.' / 'Write a decorator that retries a flaky function N times.'

    named in the job descriptions

  8. MUSTBuild
    Context managers (with, __enter__/__exit__, contextlib.contextmanager)

    Build resource setup/teardown safely — the pattern under fixtures and sessions.

    Asked 'What is a context manager? Write one.' / 'Why use with over manual open/close?'

    named in the job descriptions

  9. MUSTOwn
    OOP fundamentals (classes, __init__, self, inheritance, composition, 4 pillars)

    Model a test-framework component as classes and defend the design choice live.

    Asked 'Explain OOP with an example from your framework' / 'Design a class structure for a login-page test' / 'inheritance vs composition — when which?'

    named in the job descriptions

  10. MUSTOwn
    Built-in data structures (list/dict/set/tuple) + time complexity + when-to-use

    Pick the right structure and state its Big-O cold, because coding rounds hinge on it.

    Asked 'list vs tuple; when a set vs dict?' / most coding solutions are graded on choosing hashmap/set for O(n)

    named in the job descriptions

  11. MUSTOwn
    requests library (verbs, headers, params, json body, auth, sessions, timeouts, response handling)

    Own API testing with requests — named in nearly every JD.

    Asked 'Write an API test for this endpoint' / 'How do you structure an API client?' / 'How do you reuse auth across requests?'

    named in the job descriptions

  12. SHOULDExplain
    GIL (conceptual)

    Explain why threads don't parallelize CPU work — justifies process-based test parallelism.

    Asked 'What is the GIL? Does multithreading speed up CPU work?' / 'Why processes not threads for parallel tests?'

    named in the job descriptions

  13. SHOULDExplain
    async/await basics (coroutine, event loop concept)

    Explain coroutines enough to test async APIs — deep asyncio NOT required.

    Asked 'What is a coroutine / the event loop?' / 'How would you test an async API?'

    named in the job descriptions

  14. SHOULDApply
    *args/**kwargs, closures, lambda, first-class functions

    Use functions as values and flexible signatures — enables decorators/callbacks.

    Asked 'What is a closure?' / 'What do *args and **kwargs do?' / 'sort by a custom key'

    named in the job descriptions

  15. SHOULDApply
    functools (wraps, lru_cache, partial) + collections (defaultdict, Counter, deque, namedtuple)

    Reach for the right stdlib helper — Counter/defaultdict shortcut many coding answers.

    Asked Elegance signal in coding rounds ('solve first-non-repeating char' -> Counter); 'how do you memoize?'

    named in the job descriptions

  16. SHOULDApply
    Type hints / typing basics + dataclasses

    Annotate code and use dataclasses for clean test-data models.

    Asked 'What do type hints do at runtime?' / 'When would you use a dataclass?'

    named in the job descriptions

Pytest
not started0/15
  1. MUSTApply
    conftest.py (sharing without imports, hierarchy, override)

    Share fixtures/config across the suite via conftest and explain resolution order.

    Asked 'What is conftest.py? How are fixtures shared?' / 'What if two conftests define the same fixture?'

    named in the job descriptions

  2. MUSTApply
    @pytest.mark.parametrize (multi-param, ids, stacking, indirect)

    Drive data-driven tests and know parametrize stacking / indirect via fixtures.

    Asked 'How do you parametrize? Stack parametrize?' / 'What is indirect parametrization?'

    named in the job descriptions

  3. MUSTApply
    Markers (skip/skipif/xfail, custom markers, registration, --strict-markers, -m)

    Tag and select tests; register custom markers to avoid warnings/errors.

    Asked 'skip vs xfail?' / 'How do you run only smoke tests?' / 'How do you register a custom marker?'

    named in the job descriptions

  4. MUSTApply
    Assertions (plain assert introspection, pytest.raises, pytest.approx)

    Assert idiomatically and test exceptions/floats correctly.

    Asked 'How do you assert an exception is raised?' / 'Why plain assert not assertEqual?' / 'Compare floats in a test.'

    named in the job descriptions

  5. MUSTOwn
    Fixtures (yield setup/teardown, dependency injection, composition, autouse)

    Design fixtures as the backbone of a framework and defend the choices.

    Asked 'Explain fixtures' / 'fixture vs a parametrized test?' / 'How do fixtures compose?'

    named in the job descriptions

  6. MUSTOwn
    Fixture scopes (function/class/module/package/session) + when each

    Choose scope correctly and reason about it under parallelism — a senior signal.

    Asked 'Fixture scopes — when session vs function?' / 'A session fixture leaks state between tests — fix it.'

    named in the job descriptions

  7. MUSTOwn
    Mocking (unittest.mock: Mock/MagicMock/patch/side_effect/return_value/assert_called_with + pytest-mock mocker)

    Isolate the unit under test — the genuine gap for QA-background SDETs.

    Asked 'Mock vs MagicMock?' / 'return_value vs side_effect?' / 'How do you mock a method imported into another module?' (classic gotcha)

    named in the job descriptions

  8. MUSTOwn
    Framework design (fixtures + POM/API-client abstraction, test-data mgmt, env config, CI integration)

    Architect a maintainable framework and narrate the decisions — where SDET-2 offers are won.

    Asked 'Design a framework to test a login page and list the test cases' / 'Walk me through a framework you built.'

    named in the job descriptions

  9. SHOULDExplain
    BDD (pytest-bdd / behave, Gherkin) + TDD

    Speak to BDD/TDD workflow for shops that require it.

    Asked 'Have you done BDD? How does Gherkin map to steps?' / 'Explain TDD.'

    named in the job descriptions

  10. SHOULDApply
    Config (pyproject.toml / pytest.ini: addopts, testpaths, markers, ini_options)

    Configure the runner project-wide the modern way.

    Asked 'Where do you register markers / set default options?' / 'pyproject vs pytest.ini?'

    named in the job descriptions

  11. SHOULDApply
    CLI flags (-k, -x, -v, -s, --lf, -ra, --durations, -n)

    Drive the runner efficiently and debug fast in a live session.

    Asked 'How do you rerun only failed tests?' / 'How do you find your slowest tests?'

    named in the job descriptions

  12. SHOULDApply
    Ecosystem plugins (pytest-xdist, pytest-cov, pytest-html/allure, pytest-rerunfailures, pytest-mock, pytest-asyncio)

    Assemble the standard plugin stack and know each one's failure mode.

    Asked 'How do you run tests in parallel — and what breaks?' / 'How do you handle flaky tests?' / 'How do you gate on coverage?'

    named in the job descriptions

  13. SHOULDApply
    Hooks (pytest_addoption, pytest_collection_modifyitems, pytest_runtest_makereport)

    Customize runner behavior via conftest hooks — separates SDET-2 from junior.

    Asked 'How would you add a --env CLI flag?' / 'How do you attach a screenshot on test failure?'

    named in the job descriptions

  14. STRETCHApply
    Async pytest specifics (pytest-asyncio 1.0+: async fixtures, asyncio_mode, no event_loop fixture)

    Test async code the modern (2025+) way after pytest-asyncio's breaking changes.

    Asked 'How do you test an async function/endpoint?' / 'What changed in pytest-asyncio 1.0?'

    named in the job descriptions

  15. STRETCHBuild
    Custom pytest plugin (packaged, with hooks) / pytest_generate_tests dynamic parametrization

    Package reusable pytest behavior — impressive, few candidates have it.

    Asked 'Have you written a pytest plugin?' / 'How would you generate test cases dynamically from a data source?'

    named in the job descriptions

Python/framework
not started0/4
  1. SHOULDExplain
    Design patterns for test frameworks (Factory, Page Object, Strategy, Builder, Singleton)

    Speak framework architecture in the design round — know 3-4, not all 23 GoF.

    Asked 'Which design patterns have you used in your framework?' / 'How do you keep test data building clean?'

    named in the job descriptions

  2. SHOULDExplain
    SOLID principles

    Justify clean framework design with named principles.

    Asked 'Explain SOLID' / 'How do SOLID principles show up in your framework?'

    named in the job descriptions

  3. SHOULDApply
    Schema / JSON response validation (jsonschema or pydantic)

    Assert API contract shape, not just individual fields — higher-signal API testing.

    Asked 'How do you validate an API response beyond status code?' / 'How do you assert the response schema?'

    named in the job descriptions

  4. SHOULDApply
    Debugging: tracebacks, pdb/breakpoint(), logging

    Debug fast in a live session and when triaging complex automation failures.

    Asked 'How do you debug a failing/flaky test?' / live: 'this test fails, find out why'

    named in the job descriptions

DSA
not started0/7
  1. MUSTApply
    Two-pointer & sliding window

    Recognize and apply the two highest-yield array/string patterns.

    Asked 'Find all anagram start indices' (sliding window) / 'triplet summing to target' (two-pointer)

    named in the job descriptions

  2. MUSTApply
    Stack / queue

    Use LIFO/FIFO for the bracket/parsing family.

    Asked 'Validate balanced brackets' / 'evaluate/parse this expression'

    named in the job descriptions

  3. MUSTApply
    Recursion + sorting/searching (binary search)

    Write clean recursion and binary search with correct base cases/bounds.

    Asked 'Write factorial recursively, handle edge cases' / 'search in a sorted array in O(log n)'

    named in the job descriptions

  4. MUSTApply
    Easy trees + linked lists (traversal, reverse, palindrome, invert)

    Handle basic pointer/node problems — the TOP of the useful DSA ceiling for this band.

    Asked 'Invert a binary tree' / 'reverse a linked list' / 'is this linked list a palindrome without extra space'

    named in the job descriptions

  5. MUSTOwn
    Arrays / strings / hashmaps / sets

    Solve the most common coding-round category cleanly and optimally.

    Asked Live coding: 'return all start indices of pattern's anagrams' / 'first non-repeating character' / two-sum

    named in the job descriptions

  6. MUSTOwn
    Complexity / Big-O trade-off reasoning (articulation)

    State and defend time/space complexity out loud — the 2025-2026 raised bar.

    Asked 'What's the time and space complexity?' / 'Can you do better than O(n^2)?' / 'What's the trade-off?'

    named in the job descriptions

Write to me

If any of this is something you can help with, or you think I have got it wrong, write and tell me. I read them all myself.

Dhanunjaya M.Dhanunjaya M
tvsdhanan009@gmail.com →

One address, no form, no list to join. I am not asking for money, and there is nothing set up here that could take any.