Ejemplo n.º 1
0
 def test_files(self):
     with open(SCREENSHOT_FILES) as file_pointer:
         testrunner = TestRunner.from_file(file_pointer)
     results = testrunner.run(WebDriver(CHROMEDRIVER))
     self.assertEqual(results.files.keys(), ['test.png'])
     with open('/tmp/test.png', 'w') as file_pointer:
         copyfileobj(results.files['test.png'], file_pointer)
Ejemplo n.º 2
0
 def test_files(self):
     with open(SCREENSHOT_FILES) as file_pointer:
         testrunner = TestRunner.from_file(file_pointer)
     results = testrunner.run(WebDriver(CHROMEDRIVER))
     self.assertEqual(results.files.keys(), ['test.png'])
     with open('/tmp/test.png', 'w') as file_pointer:
         copyfileobj(results.files['test.png'], file_pointer)
Ejemplo n.º 3
0
 def test_testrunner(self):
     """
     run the test with a chromium webdriver
     """
     with open(TEST_FILE) as file_pointer:
         testrunner = TestRunner.from_file(file_pointer)
     results = testrunner.run(WebDriver(CHROMEDRIVER))
     self.assertFalse(False in results.results)
     self.assertTrue(True in results.results)
Ejemplo n.º 4
0
 def test_testrunner(self):
     """
     run the test with a chromium webdriver
     """
     with open(TEST_FILE) as file_pointer:
         testrunner = TestRunner.from_file(file_pointer)
     results = testrunner.run(WebDriver(CHROMEDRIVER))
     self.assertFalse(False in results.results)
     self.assertTrue(True in results.results)
Ejemplo n.º 5
0
 def test_create_from_file(self):
     with open(TEST_FILE) as file_pointer:
         TestRunner.from_file(file_pointer)
Ejemplo n.º 6
0
 def test_create_from_file(self):
     with open(TEST_FILE) as file_pointer:
         TestRunner.from_file(file_pointer)