mirror of
https://github.com/NanjingForestryUniversity/tobacoo-industry.git
synced 2025-11-08 14:23:53 +00:00
20 lines
560 B
Python
Executable File
20 lines
560 B
Python
Executable File
import unittest
|
|
|
|
import numpy as np
|
|
|
|
from models import feature
|
|
|
|
|
|
class ModelTestCase(unittest.TestCase):
|
|
def test_feature(self):
|
|
x_list = [np.ones((8, 8, 6)) * i for i in range(9600)]
|
|
features = feature(x_list=x_list)
|
|
self.assertEqual(features[0][0], 0) # add assertion here
|
|
self.assertEqual(features[0][5], 0) # add assertion here
|
|
self.assertEqual(features[-1][5], 9599) # add assertion here
|
|
self.assertEqual(features[-1][0], 9599) # add assertion here
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|