Exemple #1
0
    def test_fail_if(self):
        tests = deepcopy(self.tests)
        tests = list(fail_if(tests, {}))
        self.assertNotIn('expected', tests[2])

        tests = deepcopy(self.tests)
        tests = list(fail_if(tests, {'foo': 'bar'}))
        self.assertEquals(tests[2]['expected'], 'fail')
Exemple #2
0
def test_fail_if(tests):
    ref = deepcopy(tests)
    tests = list(fail_if(tests, {}))
    assert "expected" not in tests[3]

    tests = deepcopy(ref)
    tests = list(fail_if(tests, {"foo": "bar"}))
    assert tests[3]["expected"] == "fail"
    def test_fail_if(self):
        tests = deepcopy(self.tests)
        tests = list(fail_if(tests, {}))
        self.assertNotIn('expected', tests[3])

        tests = deepcopy(self.tests)
        tests = list(fail_if(tests, {'foo': 'bar'}))
        self.assertEquals(tests[3]['expected'], 'fail')
Exemple #4
0
def test_fail_if(tests):
    ref = deepcopy(tests)
    tests = list(fail_if(tests, {}))
    assert 'expected' not in tests[3]

    tests = deepcopy(ref)
    tests = list(fail_if(tests, {'foo': 'bar'}))
    assert tests[3]['expected'] == 'fail'