/
pytest_output_for_unittest_example.txt
31 lines (23 loc) · 1.57 KB
/
pytest_output_for_unittest_example.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(selenium_training) C:\Users\Mikhail\Documents\Development\sandbox_python\mera\selenium_training>py.test.exe -v -s unittest_example.py
============================= test session starts =============================
platform win32 -- Python 2.7.8 -- py-1.4.30 -- pytest-2.7.2 -- c:\users\mikhail\documents\development\virtual_environments\selenium_training\scripts\python.exe
rootdir: C:\Users\Mikhail\Documents\Development\sandbox_python\mera\selenium_training, inifile:
collected 2 items
unittest_example.py::UnitTestExample::testCorrectCheckTitle Unittest set-up class method
Unittest set-up method
Unittest tear-down method
PASSED
unittest_example.py::UnitTestExample::testIncorrectCheckTitle Unittest set-up method
Start new browser instance
Unittest tear-down method
FAILEDUnittest tear-down class method
================================== FAILURES ===================================
___________________ UnitTestExample.testIncorrectCheckTitle ___________________
self = <mera.selenium_training.unittest_example.UnitTestExample testMethod=testIncorrectCheckTitle>
def testIncorrectCheckTitle(self):
actual_title = self.page.open_web_page(google_url)
> self.assertEqual(yandex_title, actual_title, "Title is incorrect. Expected '{}', Actual '{}'".format(yandex_title, actual_title))
E AssertionError: Title is incorrect. Expected 'Yandex', Actual 'Google'
unittest_example.py:39: AssertionError
===================== 1 failed, 1 passed in 41.72 seconds =====================
(selenium_training) C:\Users\Mikhail\Documents\Development\sandbox_python\mera\selenium_training>