diff --git a/longbow/corelibs/entrypoints.py b/longbow/corelibs/entrypoints.py index ee89646..73de6ed 100644 --- a/longbow/corelibs/entrypoints.py +++ b/longbow/corelibs/entrypoints.py @@ -518,7 +518,7 @@ def _downloadexamples(longbowargs): print("Extracting the archive file...") subprocess.call( - ["unzip", "-d", os.getcwd(), + ["unzip", "-d", os.path.join(os.getcwd(), "longbow-examples/"), os.path.join(os.getcwd(), "longbow-examples.zip")]) print("Removing the zip archive file...") diff --git a/tests/unit/corelibs_entrypoints/test_downloadexamples.py b/tests/unit/corelibs_entrypoints/test_downloadexamples.py index 39a4548..2aa0650 100644 --- a/tests/unit/corelibs_entrypoints/test_downloadexamples.py +++ b/tests/unit/corelibs_entrypoints/test_downloadexamples.py @@ -54,11 +54,11 @@ def test_downloadexamples_wget(): assert not os.path.isfile( os.path.join(os.getcwd(), "longbow-examples.zip")) - assert os.path.isdir(os.path.join(os.getcwd(), "LongbowExamples/")) + assert os.path.isdir(os.path.join(os.getcwd(), "longbow-examples/")) - if os.path.isdir(os.path.join(os.getcwd(), "LongbowExamples/")): + if os.path.isdir(os.path.join(os.getcwd(), "longbow-examples/")): - shutil.rmtree(os.path.join(os.getcwd(), "LongbowExamples/")) + shutil.rmtree(os.path.join(os.getcwd(), "longbow-examples/")) @mock.patch('subprocess.check_call') @@ -78,8 +78,8 @@ def test_downloadexamples_curl(mock_check_call): assert not os.path.isfile( os.path.join(os.getcwd(), "longbow-examples.zip")) - assert os.path.isdir(os.path.join(os.getcwd(), "LongbowExamples/")) + assert os.path.isdir(os.path.join(os.getcwd(), "longbow-examples/")) - if os.path.isdir(os.path.join(os.getcwd(), "LongbowExamples/")): + if os.path.isdir(os.path.join(os.getcwd(), "longbow-examples/")): - shutil.rmtree(os.path.join(os.getcwd(), "LongbowExamples/")) + shutil.rmtree(os.path.join(os.getcwd(), "longbow-examples/"))