-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
47 lines (42 loc) · 1.54 KB
/
Copy pathpyproject.toml
File metadata and controls
47 lines (42 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[project]
name = "python-with-tests"
version = "0.1.0"
description = "Learn Python for coding interviews, test-first — a TDD-driven, patterns-first interview prep book."
readme = "README.md"
requires-python = ">=3.9"
license = { text = "MIT" }
# Runtime deps: none. Every chapter is plain-stdlib Python so solutions stay
# interview-realistic (no third-party imports allowed in a real interview).
[dependency-groups]
# Dev tooling. Install with `uv sync` (preferred) or
# `pip install pytest hypothesis ruff` into a venv.
dev = [
"pytest>=8.0",
"hypothesis>=6.0",
"ruff>=0.5",
]
[tool.pytest.ini_options]
# All chapter code lives under code/; prose lives under book/. Each chapter keeps its tests
# next to its code.
testpaths = ["code"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Don't let the gitignored reference clone, the prose, or the book build dir get collected.
# Keep pytest's default dot-dir ignores (".*" covers .venv, .hypothesis, .git, .ruff_cache)
# and add our project-specific ones.
norecursedirs = [".*", "book", "references", "_book", "node_modules", "*.egg-info", "build", "dist"]
addopts = "-ra"
markers = [
"slow: marks slower tests (deselect with '-m \"not slow\"')",
]
[tool.ruff]
target-version = "py39"
line-length = 100
extend-exclude = ["references", "_book", "book"]
[tool.ruff.lint]
# Keep it friendly for a teaching repo: errors, pyflakes, imports, bugbear, pyupgrade.
select = ["E", "F", "I", "B", "UP"]
ignore = [
"E501", # long lines are fine in teaching prose/snippets
]