Skip to content

Commit

Permalink
Ensured _version is always available in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Oct 16, 2024
1 parent 8d256f7 commit 5fee5d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import importlib
import os
import subprocess
import sys
from pathlib import Path


def test_version():
version_file = Path("montepy") / "_version.py"
if not version_file.exists():
subprocess.run(
["python", "-m", "setuptools_scm", "--force-write-version-files"]
)
assert os.path.exists(os.path.join("montepy", "_version.py"))
# Test without version.py
try:
Expand Down

0 comments on commit 5fee5d7

Please sign in to comment.