cosmit, squash

This commit is contained in:
Colin Goutte 2023-08-23 16:20:31 +02:00
parent 28db07d765
commit 4009cf6c7e
2 changed files with 7 additions and 4 deletions

View File

@ -19,7 +19,7 @@ install:
$(python) -m pip install -r requirements.txt
test:
$(python) -m unittest --discover .
already_in_venv=True $(python) -m unittest discover .
run:

View File

@ -2,8 +2,10 @@
Testing guidelines and install
"""
import os
import unittest
from subprocess import run
from subprocess import run, CalledProcessError
import pathlib
@ -20,8 +22,9 @@ class TestGuidelines(unittest.TestCase):
target = pathlib.Path(root_dir) / "requirements.txt"
assert target.exists()
assert target.isFile()
assert target.is_file()
@unittest.skipIf(os.environ.get("already_in_venv"), "Avoid self call infinite loop")
def test_environment(self):
"""We want to make sure that the project is virtualenv compatible.
we may provie and extra makefile for that (and automate build phase)
@ -33,6 +36,6 @@ class TestGuidelines(unittest.TestCase):
with self.subTest(setp=step):
try:
run(["make", *venv, step], check=True)
except Exception as E:
except CalledProcessError as E:
print(E.output)
raise