Skip to content

Commit

Permalink
test fixed for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Jul 26, 2023
1 parent c76c70e commit 914327e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import subprocess
import shutil

Expand Down Expand Up @@ -28,14 +29,16 @@ def test_cli_where():
os.path.join('tests', 'cli', 'data', 'chpok'): 'is_even',
}

for path in base_libs_paths:
for path, library_name in base_libs_paths.items():
full_path_to_the_lib = os.path.join(path, 'lib')
print('basename:', os.path.basename(os.listdir(path=full_path_to_the_lib)[0]))
print('listdir:', os.listdir(path=full_path_to_the_lib))
import sys
print('sys.platform:', sys.platform)
full_path_to_the_lib = os.path.join(full_path_to_the_lib, os.path.basename(os.listdir(path=full_path_to_the_lib)[0]), 'site-packages')
full_path_to_the_lib = os.path.join(full_path_to_the_lib, base_libs_paths[path])
print(sys.platform, sys.platform.lower())
if sys.platform.lower() not in ('win32',):
print('NOT WIN!')
full_path_to_the_lib = os.path.join(full_path_to_the_lib, os.path.basename(os.listdir(path=full_path_to_the_lib)[0]), 'site-packages')
else:
print('ELSE')
full_path_to_the_lib = os.path.join(full_path_to_the_lib, 'site-packages')
full_path_to_the_lib = os.path.join(full_path_to_the_lib, library_name)

print('full_path_to_the_lib:', full_path_to_the_lib)

Expand Down

0 comments on commit 914327e

Please sign in to comment.