Skip to content

Commit 7fb419a

Browse files
committed
chore: remove test_distribution.py
It was always skipped in CI tests and relies on plugins that do not support python 3.12 Remove the file and move the version check to test_ninja.
1 parent d79e614 commit 7fb419a

File tree

6 files changed

+9
-52
lines changed

6 files changed

+9
-52
lines changed

docs/update_ninja_version.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ Classic procedure:
4444
Updating README.rst - done
4545
Updating docs/update_ninja_version.rst
4646
Updating docs/update_ninja_version.rst - done
47-
Updating tests/test_distribution.py
48-
Updating tests/test_distribution.py - done
47+
Updating tests/test_ninja.py
48+
Updating tests/test_ninja.py - done
4949

5050

5151
3. Create a topic named `update-to-ninja-X.Y.Z` and commit the changes.
5252
For example::
5353

5454
release=1.11.1.g95dee.kitware.jobserver-1
5555
git checkout -b update-to-ninja-${release}
56-
git add NinjaUrls.cmake README.rst docs/update_ninja_version.rst tests/test_distribution.py
56+
git add NinjaUrls.cmake README.rst docs/update_ninja_version.rst tests/test_ninja.py
5757
git commit -m "Update to Ninja ${release}"
5858

5959
4. Create a `Pull Request`.

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def bump(session: nox.Session) -> None:
102102
files = (
103103
"NinjaUrls.cmake",
104104
"README.rst",
105-
"tests/test_distribution.py",
105+
"tests/test_ninja.py",
106106
"docs/update_ninja_version.rst",
107107
)
108108
session.run(

requirements-test.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ coverage>=4.2
33
flake8>=3.0.4
44
pytest>=4.5.0
55
pytest-cov>=2.7.1
6-
pytest-runner>=5.1
7-
pytest-virtualenv>=1.7.0
86
virtualenv>=15.0.3

scripts/update_ninja_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def update_tests(version):
173173
pattern = re.compile(r'expected_version = "\d+.\d+.\d+(\.[\w\-]+)*"')
174174
replacement = 'expected_version = "%s"' % version
175175
_update_file(os.path.join(
176-
ROOT_DIR, "tests/test_distribution.py"), pattern, replacement)
176+
ROOT_DIR, "tests/test_ninja.py"), pattern, replacement)
177177

178178

179179
def main():
@@ -214,7 +214,7 @@ def main():
214214
Complete! Now run:
215215
216216
git switch -c update-to-ninja-{release}
217-
git add -u NinjaUrls.cmake docs/index.rst README.rst tests/test_distribution.py docs/update_ninja_version.rst
217+
git add -u NinjaUrls.cmake docs/index.rst README.rst tests/test_ninja.py docs/update_ninja_version.rst
218218
git commit -m "Update to Ninja {release}"
219219
gh pr create --fill --body "Created by update_ninja_version.py"
220220
"""

tests/test_distribution.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

tests/test_ninja.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ def test_ninja_module():
2222

2323

2424
def test_ninja_package():
25-
subprocess.check_call([sys.executable, "-m", "ninja", "--version"])
25+
expected_version = "1.11.1.git.kitware.jobserver-1"
26+
output = subprocess.check_output([sys.executable, "-m", "ninja", "--version"]).decode("ascii")
27+
assert output.splitlines()[0] == expected_version

0 commit comments

Comments
 (0)