Skip to content

Commit

Permalink
Deal with deleted tests that got results when updating expected data.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham committed Aug 15, 2014
1 parent 56a0ebe commit 5a1ff85
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions wptrunner/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ def test_id(self, id):

def test_start(self, data):
test_id = self.test_id(data["test"])
test = self.expected_tree[self.id_path_map[test_id]].get_test(test_id)
try:
test = self.expected_tree[self.id_path_map[test_id]].get_test(test_id)
except KeyError:
print "Test not found %s, skipping" % test_id
return
self.test_cache[test_id] = test

if test_id not in self.tests_visited:
Expand All @@ -208,7 +212,9 @@ def test_start(self, data):

def test_status(self, data):
test_id = self.test_id(data["test"])
test = self.test_cache[test_id]
test = self.test_cache.get(test_id)
if test is None:
return
test_cls = wpttest.manifest_test_cls[test.test_type]

subtest = test.get_subtest(data["subtest"])
Expand All @@ -224,7 +230,9 @@ def test_status(self, data):

def test_end(self, data):
test_id = self.test_id(data["test"])
test = self.test_cache[test_id]
test = self.test_cache.get(test_id)
if test is None:
return
test_cls = wpttest.manifest_test_cls[test.test_type]

result = test_cls.result_cls(
Expand Down

0 comments on commit 5a1ff85

Please sign in to comment.