Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #328 from 515hikaru/feature/fix-typo
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
orsinium committed Dec 17, 2019
2 parents ccca4d2 + 4a8e85f commit db0921e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dephell/actions/_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def get_packages(reqs: Iterable[str]) -> List[Dependency]:
root = PIPConverter(lock=False).loads('\n'.hoin(reqs))
root = PIPConverter(lock=False).loads('\n'.join(reqs))
return root.dependencies


Expand Down
43 changes: 43 additions & 0 deletions tests/test_commands/test_deps_audit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# built-in
import json
import sys
from pathlib import Path

# external
import pytest
from dephell_venvs import VEnv

# project
from dephell.commands import DepsAuditCommand
from dephell.config import Config


@pytest.mark.allow_hosts()
def test_deps_audit_command(temp_path: Path, capsys):
reqs_path = temp_path / 'requirements.txt'
reqs_path.write_text('six==1.12.0')

venv_path = temp_path / 'venv'
venv = VEnv(path=venv_path)
assert venv.exists() is False
venv.create(python_path=sys.executable)

config = Config()
config.attach({
'level': 'WARNING',
'silent': True,
'nocolors': True,
})

command = DepsAuditCommand(argv=['jinja2==2.0'], config=config)
result = command()

captured = capsys.readouterr()
print(captured.err)
print(captured.out)
assert result is False
output = json.loads(captured.out)
assert len(output) >= 2
for entry in output:
assert entry['current'] == '2.0'
assert entry['name'] == 'jinja2'

0 comments on commit db0921e

Please sign in to comment.