コード例 #1
0
class ImageTest(unittest.TestCase):
	def setUp(self):
		self.subject = Image(
			filename='tests/fixtures/Training_Data/BLACK_BASE/' \
			'BLACK_16c25a59-c736-431f-8fe2-25664299eaea.png')

	def test_with_filename(self):
		self.assertTrue(self.subject.image is not None)

	def test_with_image(self):
		image2 = Image(image=self.subject.image)
		assert_equal(image2.image, self.subject.image)

	def test_feature(self):
		image2 = Image(image=self.subject.image)
		assert_equal(image2.feature(), self.subject.feature())
コード例 #2
0
class ImageTest(unittest.TestCase):
    def setUp(self):
        self.subject = Image(
         filename='tests/fixtures/Training_Data/BLACK_BASE/' \
         'BLACK_16c25a59-c736-431f-8fe2-25664299eaea.png')

    def test_with_filename(self):
        self.assertTrue(self.subject.image is not None)

    def test_with_image(self):
        image2 = Image(image=self.subject.image)
        assert_equal(image2.image, self.subject.image)

    def test_feature(self):
        image2 = Image(image=self.subject.image)
        assert_equal(image2.feature(), self.subject.feature())
コード例 #3
0
 def test_predict(self):
     image = Image(filename=ImageReader('BLACK_BASE').filenames()[0]).image
     ScreenReader.predict(image)
     ScreenReader.predict(image)
     ScreenReader.predict(image)
コード例 #4
0
	def test_feature(self):
		image2 = Image(image=self.subject.image)
		assert_equal(image2.feature(), self.subject.feature())
コード例 #5
0
	def setUp(self):
		self.subject = Image(
			filename='tests/fixtures/Training_Data/BLACK_BASE/' \
			'BLACK_16c25a59-c736-431f-8fe2-25664299eaea.png')
コード例 #6
0
 def test_with_image(self):
     image2 = Image(image=self.subject.image)
     assert_equal(image2.image, self.subject.image)
コード例 #7
0
 def setUp(self):
     self.subject = Image(
      filename='tests/fixtures/Training_Data/BLACK_BASE/' \
      'BLACK_16c25a59-c736-431f-8fe2-25664299eaea.png')
コード例 #8
0
 def test_feature(self):
     image2 = Image(image=self.subject.image)
     assert_equal(image2.feature(), self.subject.feature())