Browse Source

Fix test for Python 3.5

Thomas Kluyver 6 years ago
parent
commit
0d2fae889e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      nsist/tests/test_commands.py

+ 4 - 4
nsist/tests/test_commands.py

@@ -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