Skip to content

Commit b0273ec

Browse files
author
peng.li24
committed
feat: add __main__ entry so 'python tests/test_all.py' works directly
1 parent 94a831e commit b0273ec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/test_all.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,3 +1188,9 @@ def test_ij_ij_to_i(self, cpp, dtype, n, dims):
11881188
assert_bit_aligned(cpp.einsum("ij,ij->i", a, b),
11891189
np.einsum("ij,ij->i", a, b),
11901190
f"gate_machine [{n},{dims}]")
1191+
1192+
1193+
if __name__ == "__main__":
1194+
import sys, os
1195+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
1196+
sys.exit(pytest.main([__file__, "-q", "--tb=short", "--no-header"]))

0 commit comments

Comments
 (0)