def test_migrate(monkeypatch, capsys, testdir):
    tests = testdir.mkpydir('tests')

    tests.join("test_foo.py").write(py.code.Source('''
        """Foo bar tests."""
        from pytest_bdd import scenario

        test_foo = scenario('foo_bar.feature', 'Foo bar')
    '''))

    monkeypatch.setattr(sys, 'argv', ['', 'migrate', tests.strpath])
    main()
    out, err = capsys.readouterr()
    out = '\n'.join(sorted(out.splitlines()))
    expected = textwrap.dedent('''
    migrated: {0}/test_foo.py
    skipped: {0}/__init__.py'''.format(tests.strpath)[1:])
    assert out == expected
    assert tests.join("test_foo.py").read() == textwrap.dedent('''
    """Foo bar tests."""
    from pytest_bdd import scenario

    @scenario('foo_bar.feature', 'Foo bar')
    def test_foo():
        pass
    ''')
Return all sentences in the corpus.
dataset/ETHPy150Open pytest-dev/pytest-bdd/tests/scripts/test_migrate.py/test_migrate--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/corpus/reader/comparative_sents.py/ComparativeSentencesCorpusReader.sents