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'))
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))
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'))