Skip to content

Commit

Permalink
add a test on the behavior of class attributes (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt authored Mar 16, 2023
1 parent a85f8b1 commit bfbde8b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/API1/testparameterizedobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,3 +797,19 @@ class B(A):
b = B()

assert b.param.p.allow_None is True


def test_inheritance_class_attribute_behavior():
class A(param.Parameterized):
p = param.Parameter(1)

class B(A):
p = param.Parameter()

assert B.p == 1

A.p = 2

# Should be 2?
# https://github.com/holoviz/param/issues/718
assert B.p == 1

0 comments on commit bfbde8b

Please sign in to comment.