Run black on IOS-Python

This commit is contained in:
Dion Moult
2024-07-26 12:00:28 +10:00
parent d51fa2c5f7
commit a6286293d8
83 changed files with 603 additions and 637 deletions
+13 -8
View File
@@ -9,10 +9,13 @@ import ifcopenshell.validate
import ifcopenshell.express.rule_executor
@pytest.mark.parametrize(
"filename",
[fn for fn in glob.glob(os.path.join(os.path.dirname(__file__), "fixtures/rules/*.ifc")) if len(sys.argv) < 2 or sys.argv[1] in os.path.basename(fn)],
[
fn
for fn in glob.glob(os.path.join(os.path.dirname(__file__), "fixtures/rules/*.ifc"))
if len(sys.argv) < 2 or sys.argv[1] in os.path.basename(fn)
],
)
def test_file(filename):
base = os.path.basename(filename)
@@ -27,12 +30,14 @@ def test_file(filename):
print(f"{len(results)} errors")
if results:
print(tabulate.tabulate(
[[c or '' for c in r.values()] for r in results],
maxcolwidths=[20,100,20],
tablefmt="simple_grid",
headers=results[0].keys()
))
print(
tabulate.tabulate(
[[c or "" for c in r.values()] for r in results],
maxcolwidths=[20, 100, 20],
tablefmt="simple_grid",
headers=results[0].keys(),
)
)
if base.startswith("fail-"):
assert len(results) > 0