mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Another attempt to skip flakey Selenium tests.
- Flakey was throwing nose's SkipTest but the Selenium framework was catching unittest's, fix that to use unittest version in both places. - There problematic test is still throwing exceptions in the tearDown which is still causing build failures, skip the whole test.
This commit is contained in:
@@ -2,6 +2,7 @@ import contextlib
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
from functools import wraps
|
||||
from operator import itemgetter
|
||||
|
||||
@@ -33,10 +34,11 @@ def flakey(method):
|
||||
def wrapped_method(test_case, *args, **kwargs):
|
||||
try:
|
||||
method(test_case, *args, **kwargs)
|
||||
except unittest.SkipTest:
|
||||
raise
|
||||
except Exception:
|
||||
if SKIP_FLAKEY_TESTS_ON_ERROR:
|
||||
from nose.plugins.skip import SkipTest
|
||||
raise SkipTest()
|
||||
raise unittest.SkipTest("Error encountered during test marked as @flakey.")
|
||||
else:
|
||||
raise
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from base.populators import flakey
|
||||
import unittest
|
||||
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
@@ -6,12 +6,12 @@ from .framework import (
|
||||
)
|
||||
|
||||
|
||||
@unittest.skip
|
||||
class LibraryToCollectionsTestCase(SeleniumTestCase):
|
||||
|
||||
requires_admin = True
|
||||
|
||||
@selenium_test
|
||||
@flakey
|
||||
def test_list_creation(self):
|
||||
self.admin_login()
|
||||
self.perform_upload(self.get_filename("1.bed"))
|
||||
|
||||
Reference in New Issue
Block a user