<s> from nose2 . compat import unittest <EOL> STATE = { } <EOL> class Base ( object ) : <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class LayerA ( Base ) : <EOL> position = <NUM_LIT:1> <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> @ classmethod <EOL> def testSetUp ( cls , test ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def testTearDown ( cls , test ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class LayerA_1 ( LayerA ) : <EOL> position = <NUM_LIT:0> <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class LayerB ( LayerA ) : <EOL> position = <NUM_LIT:2> <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class LayerB_1 ( LayerB ) : <EOL> position = <NUM_LIT:0> <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class LayerC ( LayerB , LayerA ) : <EOL> position = <NUM_LIT:1> <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class LayerD ( Base ) : <EOL> position = <NUM_LIT:0> <EOL> @ classmethod <EOL> def setUp ( cls ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> @ classmethod <EOL> def tearDown ( cls ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> class Outer ( unittest . TestCase ) : <EOL> layer = Base <EOL> def test ( self ) : <EOL> self . assertEqual ( STATE . get ( '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> class InnerA ( unittest . TestCase ) : <EOL> layer = LayerA <EOL> def setUp ( self ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> def tearDown ( self ) : <EOL> del STATE [ '<STR_LIT>' ] <EOL> def test ( self ) : <EOL> expect = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> for k , v in expect . items ( ) : <EOL> self . assertEqual ( STATE . get ( k ) , v ) <EOL> class InnerA_1 ( unittest . TestCase ) : <EOL> layer = LayerA_1 <EOL> def test ( self ) : <EOL> expect = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> for k , v in expect . items ( ) : <EOL> self . assertEqual ( STATE . get ( k ) , v ) <EOL> class InnerB ( unittest . TestCase ) : <EOL> layer = LayerB <EOL> def setUp ( self ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> def tearDown ( self ) : <EOL> STATE [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> class InnerB_1 ( unittest . TestCase ) : <EOL> layer = LayerB_1 <EOL> def test ( self ) : <EOL> expect = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> for k , v in expect . items ( ) : <EOL> self . assertEqual ( STATE . get ( k ) , v ) <EOL> class InnerC ( unittest . TestCase ) : <EOL> layer = LayerC <EOL> def test ( self ) : <EOL> expect = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> for k , v in expect . items ( ) : <EOL> self . assertEqual ( STATE . get ( k ) , v ) <EOL> def test2 ( self ) : <EOL> expect = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> for k , v in expect . items ( ) : <EOL> self . assertEqual ( STATE . get ( k ) , v ) <EOL> class InnerD ( unittest . TestCase ) : <EOL> layer = LayerD <EOL> def test ( self ) : <EOL> self . assertEqual ( <EOL> { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } , <EOL> STATE ) <EOL> class NoLayer ( unittest . TestCase ) : <EOL> def test ( self ) : <EOL> self . assertEqual ( STATE , { } ) </s>
