示例#1
0
def test_opt_output_and_dev_output(fake_pipenv, mocker, fs):
    fake_args = mocker.Mock("fake_args")
    fake_args.output = "requirements-custom.txt"
    fake_args.dev_output = "requirements-dev-custom.txt"
    fake_args.freeze = None
    mocker.patch("pipenv_to_requirements.parse_args", return_value=fake_args)

    main()
    assert os.path.exists('requirements-custom.txt')
    assert os.path.exists('requirements-dev-custom.txt')
示例#2
0
def test_no_opt(fake_pipenv, mocker, fs):
    fake_args = mocker.Mock("fake_args")
    fake_args.output = None
    fake_args.dev_output = None
    fake_args.freeze = None
    fake_args.quiet = None
    mocker.patch("pipenv_to_requirements.parse_args", return_value=fake_args)

    main()
    assert os.path.exists('requirements.txt')
    assert os.path.exists('requirements-dev.txt')