24 lines
607 B
Python
24 lines
607 B
Python
from pathlib import Path
|
|||
|
|
import unittest
|
||
|
|
|
||
|
|
|
||
|
|
PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
||
|
|
|
||
|
|
|
||
|
|
class DependencyConstraintsTest(unittest.TestCase):
|
||
|
|
def test_numpy_is_pinned_to_compatible_version(self) -> None:
|
||
|
|
requirements = (PROJECT_ROOT / "requirements.txt").read_text(
|
||
|
|
encoding="utf-8"
|
||
|
|
)
|
||
|
|
numpy_constraints = [
|
||
|
|
line.strip()
|
||
|
|
for line in requirements.splitlines()
|
||
|
|
if line.strip().lower().startswith("numpy")
|
||
|
|
]
|
||
|
|
|
||
|
|
self.assertEqual(["numpy==1.26.4"], numpy_constraints)
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
unittest.main()
|