Esempio n. 1
0
 def test_state_overwrite(self):
     b1 = Block('piston', dict(facing='up'))
     b2 = b1.state(facing='down')
     self.assertEqual(b1.block_id, 'piston')
     self.assertEqual(b1.block_state, BlockState(facing='up'))
     self.assertEqual(b2.block_id, 'piston')
     self.assertEqual(b2.block_state, BlockState(facing='down'))
Esempio n. 2
0
 def test_state_more(self):
     b1 = Block('piston', dict(facing='up'))
     b2 = b1.state(extended=True)
     self.assertEqual(b1.block_id, 'piston')
     self.assertEqual(b1.block_state, BlockState(facing='up'))
     self.assertEqual(b2.block_id, 'piston')
     self.assertEqual(b2.block_state, BlockState(facing='up', extended=True))
Esempio n. 3
0
 def test_state(self):
     b1 = Block('piston')
     b2 = b1.state(facing='up')
     self.assertEqual(b1.block_id, 'piston')
     self.assertEqual(b1.block_state, BlockState())
     self.assertEqual(b2.block_id, 'piston')
     self.assertEqual(b2.block_state, BlockState(facing='up'))