Skip to content

Commit ef6cd42

Browse files
committed
Test that https://unpkg.com is used only in the connected mode
1 parent 2383415 commit ef6cd42

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
ITables ChangeLog
22
=================
33

4+
2.5.3-dev (unreleased)
5+
------------------
6+
7+
**Added**
8+
- Added a test to check that the offline mode does not load ITables from https://unpkg.com (the connected mode does) ([#441](https://github.com/mwouts/itables/issues/441))
9+
10+
411
2.5.2 (2025-09-02)
512
------------------
613

src/itables/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""ITables' version number"""
22

3-
__version__ = "2.5.2"
3+
__version__ = "2.5.3dev"

tests/test_connected_notebook_is_small.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ def test_connected_notebook_is_small(tmp_path, display_logo_when_loading):
3232
f"Notebook size is too large: {nb_ipynb.stat().st_size} bytes:\n"
3333
f"{nb_ipynb.read_text()}"
3434
)
35+
assert (
36+
"https://unpkg.com" in nb_ipynb.read_text()
37+
), "The connected notebook should import itables from unpkg.com"
3538

3639

3740
def test_offline_notebook_is_not_too_large(tmp_path):
@@ -43,3 +46,6 @@ def test_offline_notebook_is_not_too_large(tmp_path):
4346
size_in_kb = nb_ipynb.stat().st_size // 1024
4447

4548
assert 850 < size_in_kb < 950
49+
assert (
50+
"https://unpkg.com" not in nb_ipynb.read_text()
51+
), "The connected notebook should import itables locally"

0 commit comments

Comments
 (0)