|
@@ -10,12 +10,12 @@ cmds = {'acommand': {'entry_point': 'somemod:somefunc',
|
|
|
def test_prepare_bin_dir(tmpdir):
|
|
|
commands.prepare_bin_directory(tmpdir, cmds)
|
|
|
|
|
|
- zip_file = tmpdir / 'acommand-append.zip'
|
|
|
- exe_file = tmpdir / 'acommand.exe'
|
|
|
+ zip_file = str(tmpdir / 'acommand-append.zip')
|
|
|
+ exe_file = str(tmpdir / 'acommand.exe')
|
|
|
assert_isfile(zip_file)
|
|
|
assert_not_path_exists(exe_file) # Created by _assemble_launchers
|
|
|
|
|
|
- with ZipFile(str(zip_file)) as zf:
|
|
|
+ with ZipFile(zip_file) as zf:
|
|
|
assert zf.testzip() is None
|
|
|
script_contents = zf.read('__main__.py').decode('utf-8')
|
|
|
assert 'import extra' in script_contents
|
|
@@ -24,6 +24,6 @@ def test_prepare_bin_dir(tmpdir):
|
|
|
_assemble_launchers.main(['_assemble_launchers.py', str(tmpdir)])
|
|
|
|
|
|
assert_isfile(exe_file)
|
|
|
- with ZipFile(str(exe_file)) as zf:
|
|
|
+ with ZipFile(exe_file) as zf:
|
|
|
assert zf.testzip() is None
|
|
|
assert zf.read('__main__.py').decode('utf-8') == script_contents
|