[refactor] move tests to tests/, add pytest functions and main() entrypoints
- Moved src/tests/ → tests/ - Added test_* functions with assertions to script-style test files - Added main() to each so IDEs offer it as a separate run target from pytest - Fixed cupy_test.py: remove spurious x_gpu += x_cpu, fix duplicate xlabel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
from image.sub_image import conv2d
|
||||
from rbm.matrix import np
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
A = np.random.rand(3, 3)
|
||||
K = np.random.rand(3, 3)
|
||||
|
||||
y = conv2d(A, K, (1,1))
|
||||
print(y)
|
||||
|
||||
print("Test: [passed]")
|
||||
Reference in New Issue
Block a user