GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docsbuild-scripts/tests/test_build_docs_version.py at main · python/docsbuild-scripts

Expand file tree

/

test_build_docs_version.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
88 lines (65 loc) · 2.11 KB
/

test_build_docs_version.py

Copy path

File metadata and controls

88 lines (65 loc) · 2.11 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from __future__ import annotations
import pytest
from build_docs import Version
def test_equality() -> None:
# Arrange
version1 = Version(name="3.13", status="stable", branch_or_tag="3.13")
version2 = Version(name="3.13", status="stable", branch_or_tag="3.13")
# Act / Assert
assert version1 == version2
@pytest.mark.parametrize(
("name", "expected"),
[
("3.13", "-rrequirements.txt"),
("3.10", "standard-imghdr"),
("3.7", "sphinx==2.3.1"),
("3.5", "sphinx==1.8.4"),
],
)
def test_requirements(name: str, expected: str) -> None:
# Arrange
version = Version(name=name, status="stable", branch_or_tag="")
# Act / Assert
assert expected in version.requirements
def test_requirements_error() -> None:
# Arrange
version = Version(name="2.8", status="ex-release", branch_or_tag="")
# Act / Assert
with pytest.raises(ValueError, match="unreachable"):
_ = version.requirements
@pytest.mark.parametrize(
("status", "expected"),
[
("EOL", "never"),
("security-fixes", "yearly"),
("stable", "daily"),
],
)
def test_changefreq(status: str, expected: str) -> None:
# Arrange
version = Version(name="3.13", status=status, branch_or_tag="")
# Act / Assert
assert version.changefreq == expected
def test_url() -> None:
# Arrange
version = Version(name="3.13", status="stable", branch_or_tag="")
# Act / Assert
assert version.url == "https://docs.python.org/3.13/"
def test_title() -> None:
# Arrange
version = Version(name="3.14", status="in development", branch_or_tag="")
# Act / Assert
assert version.title == "Python 3.14 (in development)"
@pytest.mark.parametrize(
("name", "status", "expected"),
[
("3.15", "in development", "dev (3.15)"),
("3.14", "pre-release", "pre (3.14)"),
("3.13", "stable", "3.13"),
],
)
def test_picker_label(name: str, status: str, expected: str) -> None:
# Arrange
version = Version(name=name, status=status, branch_or_tag="")
# Act / Assert
assert version.picker_label == expected
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.