Example #1
0
    def testMakeDescr(self):
        """Check the generation of a descr from formats and names.
        """

        common.verbosePrint('\nTesting getDescr function')
        mix = [f for f in nriterators.getDescr(None, self.formats)]
        self.assertEqual(mix, self.autoNamedDescr)
        mix = \
            [f for f in nriterators.getDescr(self.names, self.formats)]
        self.assertEqual(mix, self.descr)
Example #2
0
    def testMakeDescr(self):
        """Check the generation of a descr from formats and names.
        """

        common.verbosePrint('\nTesting getDescr function')
        mix = [f for f in nriterators.getDescr(None, self.formats)]
        self.assertEqual(mix, self.autoNamedDescr)
        mix = \
            [f for f in nriterators.getDescr(self.names, self.formats)]
        self.assertEqual(mix, self.descr)
Example #3
0
def makeDescr(formats, names=None):
    """
    Create a ``descr`` list for the array.

    If no `names` are passed fields are automatically named as ``c1``,
    ``c2``...
    """

    return [item for item in nriterators.getDescr(names, formats)]
Example #4
0
def makeDescr(formats, names=None):
    """
    Create a ``descr`` list for the array.

    If no `names` are passed fields are automatically named as ``c1``,
    ``c2``...
    """

    return [item for item in nriterators.getDescr(names, formats)]