Esempio n. 1
0
    def from_row_column(cls, row, column):
        """
        Returns a new RackPosition instance from the row name
        and column number.
        Invokes :func:`from_indices`.

        :Note: Try not to use this method if you can avoid it as it takes
            as it takes a lot of time if you try to fetch a larger number
            of rack positions one by one. Use the rack position cache in the
            :mod:`semiconstants` module instead, if possible.

        :param row: a set of characters from a-z (or A-Z) which signifies a row
        :type row: :class:`string`

        :param column: a number signifying the row
        :type column: :class:`int`

        :return: The wanted rack position.
        :rtype: :class:`RackPosition`
        """
        row_index = number_from_label(row) - 1
        column_index = column - 1
        return cls.from_indices(row_index, column_index)
Esempio n. 2
0
    def from_row_column(cls, row, column):
        """
        Returns a new RackPosition instance from the row name
        and column number.
        Invokes :func:`from_indices`.

        :Note: Try not to use this method if you can avoid it as it takes
            as it takes a lot of time if you try to fetch a larger number
            of rack positions one by one. Use the rack position cache in the
            :mod:`semiconstants` module instead, if possible.

        :param row: a set of characters from a-z (or A-Z) which signifies a row
        :type row: :class:`string`

        :param column: a number signifying the row
        :type column: :class:`int`

        :return: The wanted rack position.
        :rtype: :class:`RackPosition`
        """
        row_index = number_from_label(row) - 1
        column_index = column - 1
        return cls.from_indices(row_index, column_index)
Esempio n. 3
0
 def test_basic(self):
     assert number_from_label('ag') == 33
Esempio n. 4
0
 def test_basic(self):
     assert number_from_label('ag') == 33