コード例 #1
0
ファイル: test.py プロジェクト: Floflis/gecko-b2g
class Collection(unittest.TestCase):
    def setUp(self):
        c1 = TestContext("host1")
        c2 = TestContext("host2")
        c3 = TestContext("host2")
        c4 = TestContext("host1")

        t1 = TestResult("t1", context=c1)
        t2 = TestResult("t2", context=c2)
        t3 = TestResult("t3", context=c3)
        t4 = TestResult("t4", context=c4)

        self.collection = TestResultCollection("tests")
        self.collection.extend([t1, t2, t3, t4])

    def test_unique_contexts(self):
        self.assertEqual(len(self.collection.contexts), 2)
コード例 #2
0
class Collection(unittest.TestCase):
    def setUp(self):
        c1 = TestContext('host1')
        c2 = TestContext('host2')
        c3 = TestContext('host2')
        c4 = TestContext('host1')

        t1 = TestResult('t1', context=c1)
        t2 = TestResult('t2', context=c2)
        t3 = TestResult('t3', context=c3)
        t4 = TestResult('t4', context=c4)

        self.collection = TestResultCollection('tests')
        self.collection.extend([t1, t2, t3, t4])

    def test_unique_contexts(self):
        self.assertEqual(len(self.collection.contexts), 2)
コード例 #3
0
ファイル: test.py プロジェクト: ThinkerYzu/mozbase
class Collection(unittest.TestCase):
    def setUp(self):
        c1 = TestContext("host1")
        c2 = TestContext("host2")
        c3 = TestContext("host2")
        c3.os = "B2G"
        c4 = TestContext("host1")

        t1 = TestResult("t1", context=c1)
        t2 = TestResult("t2", context=c2)
        t3 = TestResult("t3", context=c3)
        t4 = TestResult("t4", context=c4)

        self.collection = TestResultCollection("tests")
        self.collection.extend([t1, t2, t3, t4])

    def test_unique_contexts(self):
        self.assertEqual(len(self.collection.contexts), 3)
コード例 #4
0
ファイル: test.py プロジェクト: Wafflespeanut/gecko-dev
class Collection(unittest.TestCase):

    def setUp(self):
        c1 = TestContext('host1')
        c2 = TestContext('host2')
        c3 = TestContext('host2')
        c3.os = 'B2G'
        c4 = TestContext('host1')

        t1 = TestResult('t1', context=c1)
        t2 = TestResult('t2', context=c2)
        t3 = TestResult('t3', context=c3)
        t4 = TestResult('t4', context=c4)

        self.collection = TestResultCollection('tests')
        self.collection.extend([t1, t2, t3, t4])

    def test_unique_contexts(self):
        self.assertEqual(len(self.collection.contexts), 3)