

def test_frozen():
    code = mock_code('foo')
    stats = RecordingStatistics(code)
    stats.deep_time = 10
    restored_frozen_stats.ensure_child(None)
    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/VarMisuse@29/37 `stats`->`restored_frozen_stats`