Example #1
0
    def testgenpot(self):
        """
        Create a POT file from our test SQL statements.
        """
        subprocess.Popen(('python', self.script, '--pot', self.sqlsource,
                          '--output', self.testpot), 0, None, None).wait()

        # avoid basic timestamp conflicts
        testhelper.mungepothead(self.testpot)
        testhelper.mungepothead(self.canonpot)

        self.assertEqual(filecmp.cmp(self.canonpot, self.testpot), 1)
Example #2
0
    def testgenpot(self):
        """
        Create a POT file from our test SQL statements.
        """
        subprocess.Popen(
            ('python', self.script, '--pot', self.sqlsource,
            '--output', self.testpot),
            0, None, None).wait()

        # avoid basic timestamp conflicts
        testhelper.mungepothead(self.testpot)
        testhelper.mungepothead(self.canonpot)

        self.assertEqual(filecmp.cmp(self.canonpot, self.testpot), 1)
Example #3
0
    def testsavepot(self):
        """
        Create a POT file from a fieldmapper IDL file
        """
        devnull = open("/dev/null", "w")
        subprocess.Popen(
            ("python", self.script, "--pot", self.idlfile, "--output", self.savepot), 0, None, None, devnull, devnull
        ).wait()

        # Avoid timestamp mismatches
        testhelper.mungepothead(self.savepot)
        testhelper.mungepothead(self.testpot)

        self.assertEqual(filecmp.cmp(self.savepot, self.testpot), 1)
Example #4
0
    def testsavepot(self):
        """
        Create a POT file from a fieldmapper IDL file
        """
        devnull = open('/dev/null', 'w')
        subprocess.Popen(('python', self.script, '--pot', self.idlfile,
                          '--output', self.savepot), 0, None, None, devnull,
                         devnull).wait()

        # Avoid timestamp mismatches
        testhelper.mungepothead(self.savepot)
        testhelper.mungepothead(self.testpot)

        self.assertEqual(filecmp.cmp(self.savepot, self.testpot), 1)