Ejemplo n.º 1
0
def lowest_bit_only(s):
    deprecate.dendropy_deprecation_warning(
        preamble=
        "Deprecated since DendroPy 4: 'dendropy.treesplit.lowest_bit_only()'.",
        old_construct=
        "from dendropy import treesplit\nd = treesplit.lowest_bit_only(...)",
        new_construct=
        "from dendropy.utility import bitprocessing\nd = bitprocessing.least_significant_set_bit(...)"
    )
    return bitprocessing.least_significant_set_bit(s)
 def runTest(self):
     for n, expected in enumerate([0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16]):
         self.assertEqual(bitprocessing.least_significant_set_bit(n), expected)
Ejemplo n.º 3
0
def lowest_bit_only(s):
    deprecate.dendropy_deprecation_warning(
            preamble="Deprecated since DendroPy 4: 'dendropy.treesplit.lowest_bit_only()'.",
            old_construct="from dendropy import treesplit\nd = treesplit.lowest_bit_only(...)",
            new_construct="from dendropy.utility import bitprocessing\nd = bitprocessing.least_significant_set_bit(...)")
    return bitprocessing.least_significant_set_bit(s)
Ejemplo n.º 4
0
 def runTest(self):
     for n, expected in enumerate([0, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16]):
         self.assertEqual(bitprocessing.least_significant_set_bit(n), expected)