示例#1
0
    def test_run_if(self):
        tests = deepcopy(self.tests)
        tests = list(run_if(tests, {}))
        self.assertNotIn(self.tests[2], tests)

        tests = deepcopy(self.tests)
        tests = list(run_if(tests, {'foo': 'bar'}))
        self.assertEquals(len(tests), len(self.tests))
示例#2
0
def test_run_if(tests):
    ref = deepcopy(tests)
    tests = list(run_if(tests, {}))
    assert "disabled" in tests[2]

    tests = deepcopy(ref)
    tests = list(run_if(tests, {"foo": "bar"}))
    assert "disabled" not in tests[2]
示例#3
0
    def test_run_if(self):
        tests = deepcopy(self.tests)
        tests = list(run_if(tests, {}))
        self.assertNotIn(self.tests[2], tests)

        tests = deepcopy(self.tests)
        tests = list(run_if(tests, {'foo': 'bar'}))
        self.assertEquals(len(tests), len(self.tests))
示例#4
0
def test_run_if(tests):
    ref = deepcopy(tests)
    tests = list(run_if(tests, {}))
    assert ref[2] not in tests

    tests = deepcopy(ref)
    tests = list(run_if(tests, {'foo': 'bar'}))
    assert len(tests) == len(ref)