  class TestBits(object):
  
      def test_pairwise_swap(self):
          bits = Bits()
          assert_equal(bits.pairwise_swap(0), 0)
          assert_equal(bits.pairwise_swap(1), 1)
          num = int('0000100111110110', base=2)
          expected = int('0000011011111001', base=2)
          assert_equal(bits.pairwise_swap(num), expected)
          assert_raises(TypeError, bits.pairwise_swap, None)
          
 
</s> remove         assert_equal(bits.pairwise_swap(num), expected)
        assert_raises(TypeError, bits.pairwise_swap, None)
 </s> add         self.assertEqual(bits.pairwise_swap(num), expected)
        self.assertRaises(TypeError, bits.pairwise_swap, None) </s> remove class TestBits(object):
 </s> add class TestBits(unittest.TestCase): </s> remove         assert_raises(TypeError, bits.flip_bit, None)
        assert_equal(bits.flip_bit(0), 1)
        assert_equal(bits.flip_bit(-1), bits.MAX_BITS)
 </s> add         self.assertRaises(TypeError, bits.flip_bit, None)
        self.assertEqual(bits.flip_bit(0), 1)
        self.assertEqual(bits.flip_bit(-1), bits.MAX_BITS) </s> remove         assert_raises(Exception, bits.get_next_largest, None)
        assert_raises(Exception, bits.get_next_largest, 0)
        assert_raises(Exception, bits.get_next_largest, -1)
 </s> add         self.assertRaises(Exception, bits.get_next_largest, None)
        self.assertRaises(Exception, bits.get_next_largest, 0)
        self.assertRaises(Exception, bits.get_next_largest, -1) </s> remove class TestBits(object):
 </s> add class TestBits(unittest.TestCase):
        self.assertEqual(bits.pairwise_swap(0), 0)
        self.assertEqual(bits.pairwise_swap(1), 1)
  class TestBits(object):
  
      def test_pairwise_swap(self):
          bits = Bits()
        self.assertEqual(bits.pairwise_swap(0), 0)
        self.assertEqual(bits.pairwise_swap(1), 1)
        self.assertEqual(bits.pairwise_swap(0), 0)
        self.assertEqual(bits.pairwise_swap(1), 1)
          num = int('0000100111110110', base=2)
          expected = int('0000011011111001', base=2)
          assert_equal(bits.pairwise_swap(num), expected)
          assert_raises(TypeError, bits.pairwise_swap, None)
          
keep keep keep keep replace replace keep keep keep keep keep
 #273: Remove nose dependency for bit_manipulation/ (#279) 
bit_manipulation/pairwise_swap/test_pairwise_swap.py