Introduce classes for pytest's skipif markers.

This patch encapsulates pytests's skipif markers in classes. It leads to the following
benefits:
  - Provide context and grouping for tests being skipped.
  - As we improve test reporting, annotations will give us a better idea of coverage.

Change-Id: Ib0557fb78c873047c214bb62bb6b045ceabaf0c9
Reviewed-on: http://gerrit.cloudera.org:8080/297
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: Internal Jenkins
Reviewed-on: http://gerrit.cloudera.org:8080/343
This commit is contained in:
ishaan
2015-03-25 14:45:04 -07:00
committed by Internal Jenkins
parent 2eb12e9593
commit 09e5eaeda2
32 changed files with 97 additions and 88 deletions

View File

@@ -16,7 +16,7 @@
# Tests Impala properly handles errors when reading and writing data.
from tests.common.impala_test_suite import ImpalaTestSuite
from tests.common.skip import *
from tests.common.skip import SkipIfS3
import pytest
class TestDataErrors(ImpalaTestSuite):
@@ -29,7 +29,7 @@ class TestDataErrors(ImpalaTestSuite):
return 'functional-query'
@skip_if_s3_qualified_path
@SkipIfS3.qualified_path
class TestHdfsScanNodeErrors(TestDataErrors):
@classmethod
def add_test_dimensions(cls):
@@ -47,7 +47,7 @@ class TestHdfsScanNodeErrors(TestDataErrors):
self.run_test_case('DataErrorsTest/hdfs-scan-node-errors', vector)
@skip_if_s3_qualified_path
@SkipIfS3.qualified_path
class TestHdfsSeqScanNodeErrors(TestHdfsScanNodeErrors):
@classmethod
def add_test_dimensions(cls):
@@ -60,7 +60,7 @@ class TestHdfsSeqScanNodeErrors(TestHdfsScanNodeErrors):
self.run_test_case('DataErrorsTest/hdfs-sequence-scan-errors', vector)
@skip_if_s3_qualified_path
@SkipIfS3.qualified_path
class TestHdfsRcFileScanNodeErrors(TestHdfsScanNodeErrors):
@classmethod
def add_test_dimensions(cls):