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