예제 #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')
예제 #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"
예제 #3
0
    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')
예제 #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'