Skip to content

Commit e8cc461

Browse files
committed
Add nuget CLI extraction test #749
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent af66ca2 commit e8cc461

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Binary file not shown.

tests/scancode/test_extract_cli.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import click
3333
from click.testing import CliRunner
34+
import pytest
3435

3536
from commoncode.fileutils import as_posixpath
3637
from commoncode.fileutils import fsencode
@@ -246,3 +247,13 @@ def test_extractcode_command_can_extract_shallow(monkeypatch):
246247
'/top.zip-extract/some1.zip',
247248
]
248249
assert sorted(expected) == sorted(file_result)
250+
251+
252+
@pytest.mark.skipif(on_windows, reason='FIXME: Windows cannot extract long paths for now.')
253+
def test_extractcode_command_can_extract_nuget(monkeypatch):
254+
test_dir = test_env.get_test_loc('extract_nuget', copy=True)
255+
monkeypatch.setattr(click._termui_impl, 'isatty', lambda _: True)
256+
runner = CliRunner()
257+
result = runner.invoke(extract_cli.extractcode, ['--verbose', test_dir], catch_exceptions=False)
258+
assert result.exit_code == 0
259+
assert 'ERROR extracting' not in result.output

0 commit comments

Comments
 (0)