Selaa lähdekoodia

Test installed exe wrapper

Thomas Kluyver 5 vuotta sitten
vanhempi
säilyke
f73044351c
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7 0
      nsist/tests/test_main.py

+ 7 - 0
nsist/tests/test_main.py

@@ -70,9 +70,11 @@ def test_installer(console_eg_copy, tmp_path):
     print(os.listdir(str(inst_dir)))
     inst_python = inst_dir / 'Python' / 'python.exe'
     inst_launch_script = inst_dir / 'Sample_printer.launch.py'
+    inst_exe_wrapper = inst_dir / 'bin' / 'pynsist-test-print.exe'
 
     assert_isfile(inst_python)
     assert_isfile(inst_launch_script)
+    assert_isfile(inst_exe_wrapper)
     assert_isfile(inst_dir / 'pkgs' / 'sample_printer' / '__init__.py')
 
 
@@ -85,3 +87,8 @@ def test_installer(console_eg_copy, tmp_path):
     assert json_res['py_version'].startswith('3.6.3')  # Set in installer.cfg
     assert json_res['data_file_path'].endswith('data.txt')
     assert json_res['data_file_content'] == 'newt'
+
+    # Run through command-line wrapper
+    res2 = run([str(inst_exe_wrapper)], check=True, stdout=PIPE)
+    json_res2 = json.loads(res2.stdout.decode('utf-8', 'replace'))
+    assert json_res2 == json_res