Skip to content

Commit 9228524

Browse files
committed
Unique SOSIZE prefix to make it easier to extract the sosizes from the GitHub logs.
1 parent 9dcbd8e commit 9228524

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/test_class.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ def test_repr():
1111
# In Python 3.3+, repr() accesses __qualname__
1212
assert "pybind11_type" in repr(type(UserType))
1313
assert "UserType" in repr(UserType)
14+
import weakref
15+
u = UserType(0)
16+
w = weakref.ref(u)
17+
assert w() is not None
18+
del u
19+
assert w() is None
1420

1521

1622
def test_instance(msg):

tools/libsize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
libsize = os.path.getsize(lib)
2121

22-
print("------", os.path.basename(lib), "file size:", libsize, end="")
22+
print("SOSIZE:", os.path.basename(lib), libsize, end="")
2323

2424
if os.path.exists(save):
2525
with open(save) as sf:

0 commit comments

Comments
 (0)