@@ -835,7 +835,7 @@ def test_guess_deploy_dir(self):
835
835
self .assertEqual (abspath (bqplot_dir ), guess_deploy_dir (bqplot_dir , None ))
836
836
self .assertEqual (abspath (bqplot_dir ), guess_deploy_dir (bqplot_ipynb , None ))
837
837
self .assertEqual (abspath (bqplot_dir ), guess_deploy_dir (bqplot_ipynb , bqplot_ipynb ))
838
- self .assertEqual (abspath (bqplot_dir ), guess_deploy_dir (bqplot_dir , "bqplot.ipynb" ))
838
+ self .assertEqual (abspath (bqplot_dir ), guess_deploy_dir (bqplot_dir , bqplot_ipynb ))
839
839
840
840
841
841
@pytest .mark .parametrize (
@@ -1357,8 +1357,10 @@ def test_make_voila_bundle_2(
1357
1357
single_file_nonindex_dir = os .path .join (cur_dir , "./testdata/html_tests/single_file_nonindex" )
1358
1358
multi_file_index_dir = os .path .join (cur_dir , "./testdata/html_tests/multi_file_index" )
1359
1359
multi_file_index_file = os .path .join (cur_dir , "./testdata/html_tests/multi_file_index/index.html" )
1360
+ multi_file_index_file2 = os .path .join (cur_dir , "./testdata/html_tests/multi_file_index/main.html" )
1360
1361
multi_file_nonindex_dir = os .path .join (cur_dir , "./testdata/html_tests/multi_file_nonindex" )
1361
- multi_file_nonindex_file = os .path .join (cur_dir , "./testdata/html_tests/multi_file_nonindex/b.html" )
1362
+ multi_file_nonindex_fileb = os .path .join (cur_dir , "./testdata/html_tests/multi_file_nonindex/b.html" )
1363
+ multi_file_nonindex_filea = os .path .join (cur_dir , "./testdata/html_tests/multi_file_nonindex/a.html" )
1362
1364
1363
1365
1364
1366
def test_create_html_manifest ():
@@ -1460,7 +1462,7 @@ def test_create_html_manifest():
1460
1462
}
1461
1463
1462
1464
manifest = create_html_manifest (
1463
- multi_file_nonindex_file ,
1465
+ multi_file_nonindex_fileb ,
1464
1466
None ,
1465
1467
)
1466
1468
assert multi_file_nonindex_file_ans == json .loads (manifest .flattened_copy .json )
@@ -1476,6 +1478,37 @@ def test_create_html_manifest():
1476
1478
1477
1479
manifest = create_html_manifest (
1478
1480
multi_file_nonindex_dir ,
1479
- multi_file_nonindex_file ,
1481
+ multi_file_nonindex_fileb ,
1480
1482
)
1481
1483
assert multi_file_nonindex_dir_and_file_ans == json .loads (manifest .flattened_copy .json )
1484
+
1485
+ multi_file_nonindex_file_extras_ans = {
1486
+ "version" : 1 ,
1487
+ "metadata" : {"appmode" : "static" , "primary_html" : "b.html" , "entrypoint" : "b.html" },
1488
+ "files" : {
1489
+ "a.html" : {"checksum" : "c14bd63e50295f94b761ffe9d41e3742" },
1490
+ "b.html" : {"checksum" : "c14bd63e50295f94b761ffe9d41e3742" },
1491
+ },
1492
+ }
1493
+ manifest = create_html_manifest (
1494
+ multi_file_nonindex_fileb ,
1495
+ None ,
1496
+ extra_files = [multi_file_nonindex_filea ],
1497
+ )
1498
+ assert multi_file_nonindex_file_extras_ans == json .loads (manifest .flattened_copy .json )
1499
+
1500
+ multi_file_index_dir_extras_ans = {
1501
+ "version" : 1 ,
1502
+ "metadata" : {"appmode" : "static" , "primary_html" : "index.html" , "entrypoint" : "index.html" },
1503
+ "files" : {
1504
+ "index.html" : {"checksum" : "c14bd63e50295f94b761ffe9d41e3742" },
1505
+ "main.html" : {"checksum" : "c14bd63e50295f94b761ffe9d41e3742" },
1506
+ },
1507
+ }
1508
+
1509
+ manifest = create_html_manifest (
1510
+ multi_file_index_dir ,
1511
+ None ,
1512
+ extra_files = [multi_file_index_file2 ],
1513
+ )
1514
+ assert multi_file_index_dir_extras_ans == json .loads (manifest .flattened_copy .json )
0 commit comments