def test_frozen():
    code = mock_code('foo')
    stats = RecordingStatistics(code)
    stats.deep_time = 10
    stats.ensure_child(None)
    # RecordingStatistics are frozen at pickling.
    frozen_stats = pickle.loads(pickle.dumps(stats))
    assert frozen_stats.name == 'foo'
    assert frozen_stats.deep_time >= 10
    assert len(frozen_stats) == 1
    restored_frozen_stats = pickle.loads(pickle.dumps(frozen_stats))
    assert restored_frozen_stats.name == 'foo'
    assert restored_frozen_stats.deep_time == 10
    assert len(restored_frozen_stats) == 1
dataset/ETHPy150Open what-studio/profiling/test/test_stats.py/test_frozen/operator `==` -> `>=`