import copy from sentry_sdk.scope import Scope def test_copying(): s1 = Scope() s1.fingerprint = {} s1.set_tag("foo", "bar") s2 = copy.copy(s1) assert "foo" in s2._tags s1.set_tag("bam", "baz") assert "bam" in s1._tags assert "bam" not in s2._tags assert s1._fingerprint is s2._fingerprint