def test_should_not_run_tests_from_outside_current_root(self): state = mock('state') path = mock('path') mock_on(file_util).relative.with_(path.raw).raising(file_util.FileOutsideCurrentRoot()).is_expected.once() watcher = Watcher(state.raw) self.assertEqual(watcher.wantFile(path.raw), False)
def test_should_disregard_tests_from_outside_current_root(self): state = mock('state') path_ = mock('file') mock_on(file_util).relative.with_(path_.raw).raising(file_util.FileOutsideCurrentRoot()).is_expected.once() watcher = Watcher(state.raw) # should not affect state state.method('__getitem__').is_not_expected self.assertEqual(watcher.wantFile(path_.raw), False)
def test_should_not_run_tests_from_outside_current_root(self): state = mock('state') path = mock('path') mock_on(file_util).relative.with_(path.raw).raising( file_util.FileOutsideCurrentRoot()).is_expected.once() watcher = Watcher(state.raw) without_logging( lambda: self.assertEqual(watcher.wantFile(path.raw), False), level=logging.ERROR)
def test_should_disregard_tests_from_outside_current_root(self): state = mock('state') path = mock('file') mock_on(file_util).relative.with_(path.raw).raising( file_util.FileOutsideCurrentRoot()).is_expected.once() watcher = Watcher(state.raw) # should not affect state state.method('__getitem__').is_not_expected without_logging( lambda: self.assertEqual(watcher.wantFile(path.raw), False), level=logging.ERROR)