Example #1
0
def addition(lablResult, path1, path2):
    img1 = cv.imread(path1)
    img2 = cv.imread(path2)
    imGray1 = cv.cvtColor(img1, cv.COLOR_BGR2GRAY)
    imgGray2 = cv.cvtColor(img2, cv.COLOR_BGR2GRAY)


    imgAdd = main.addition(imGray1,imgGray2)
    cv.imwrite('result.png', imgAdd)
    image = Image.open('result.png').resize((300, 300))
    image = ImageTk.PhotoImage(image)
    lablResult.config(image=image)
    lablResult.image = image
    lablResult.place(x=0, y=0)
Example #2
0
def test_addn():
    result_3 = main.addition(4, 7)
    assert result_3 == 1
Example #3
0
def test_add():
    res = main.addition(3, 4)
    assert res == 3 + 4
Example #4
0
 def test_addition(self):
     sig = signature(addition)
     self.assertEqual(len(sig.parameters), 2)
     for _ in range(10):
         rvs = np.random.randn(2)
         self.assertEqual(rvs[0] + rvs[1], addition(rvs[0], rvs[1]))
Example #5
0
def test_addition():
    result = mn.addition(2, 3)
    assert result == 5
Example #6
0
def test_addition():
    assert addition(1, 2) == 3
    assert addition(100, 2) == 102
Example #7
0
def test_addition():
    assert addition(3, 5) == 8
Example #8
0
def test_addition():
    assert main.addition(3, 4) == 7
    assert main.addition(10, 40) == 50
    assert main.addition(39, 40) == 79
    assert main.addition(39, 41) == 80