Skip to content

Commit 971d68d

Browse files
committed
[Tests] Replace pytest.main with tvm.testing.main
This ensures that if you want to run a specific test script then at least it's reasonably consistent and as people copy test files they'll use the new function 😸
1 parent 49ed544 commit 971d68d

File tree

115 files changed

+116
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+116
-123
lines changed

tests/micro/stm32/test_code_emitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,4 +392,4 @@ def test_mnist():
392392

393393

394394
if __name__ == "__main__":
395-
sys.exit(pytest.main([os.path.dirname(__file__)] + sys.argv[1:]))
395+
tvm.testing.main()

tests/python/contrib/test_cublas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,4 +378,4 @@ def test_relay_cublas_dense(n, m, k, in_dtype, out_dtype):
378378

379379

380380
if __name__ == "__main__":
381-
pytest.main([__file__])
381+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_binary_elementwise_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,4 @@ def test_ethosu_binary_elementwise_matcher(
175175

176176

177177
if __name__ == "__main__":
178-
pytest.main([__file__])
178+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_block_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,4 @@ def test_force_block_config_elementwise(ofm_layout, block_config_str, expected_b
457457

458458

459459
if __name__ == "__main__":
460-
pytest.main([__file__])
460+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_conv2d_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,4 @@ def test_ethosu_conv2d_block_config_from_matcher(
179179

180180

181181
if __name__ == "__main__":
182-
pytest.main([__file__])
182+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_depthwise2d_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ def test_ethosu_depthwise2d_matcher(kernel, stride, dilation, padding, ifm_layou
100100

101101

102102
if __name__ == "__main__":
103-
pytest.main([__file__])
103+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_identity_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ def test_ethosu_identity_matcher():
5555

5656

5757
if __name__ == "__main__":
58-
pytest.main([__file__])
58+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_inline_matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ def test_ethosu_inline_matcher():
4747

4848

4949
if __name__ == "__main__":
50-
pytest.main([__file__])
50+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_part.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def test_ethosu_part():
5757

5858

5959
if __name__ == "__main__":
60-
pytest.main([__file__])
60+
tvm.testing.main()

tests/python/contrib/test_ethosu/cascader/test_ethosu_part_performance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ def test_conv_performance(
231231

232232

233233
if __name__ == "__main__":
234-
pytest.main([__file__])
234+
tvm.testing.main()

0 commit comments

Comments
 (0)