Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: build/android/pylib/instrumentation/instrumentation_test_instance_test.py

Issue 2580943002: Fix negative gtest filters for instrumentation tests. (Closed)
Patch Set: Reenabled test for negative filters Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/instrumentation_test_instance_test.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
index c7f609ca84e533b0fc4b358a95081e1d2aa1c4d3..10fe95c738e0cd67431c204a47106b7724582cfe 100755
--- a/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance_test.py
@@ -187,7 +187,6 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
self.assertEquals(actual_tests, expected_tests)
- @unittest.skip('crbug.com/623047')
def testGetTests_negativeGtestFilter(self):
o = self.createTestInstance()
raw_tests = [
@@ -217,9 +216,6 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
}
]
- o._GetTestsFromPickle = mock.MagicMock(return_value=raw_tests)
- o._test_filter = '*-org.chromium.test.SampleTest.testMethod1'
- o._test_jar = 'path/to/test.jar'
expected_tests = [
{
'annotations': {
@@ -239,7 +235,12 @@ class InstrumentationTestInstanceTest(unittest.TestCase):
},
]
- actual_tests = o.GetTests()
+ o._test_filter = '*-org.chromium.test.SampleTest.testMethod1'
+ o._test_jar = 'path/to/test.jar'
+ with mock.patch(_INSTRUMENTATION_TEST_INSTANCE_PATH % '_GetTestsFromPickle',
+ return_value=raw_tests):
+ actual_tests = o.GetTests()
+
self.assertEquals(actual_tests, expected_tests)
def testGetTests_annotationFilter(self):
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698