mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Run black on IOS-Python
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user