Beispiel #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)
Beispiel #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)
Beispiel #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)]
Beispiel #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)]