예제 #1
0
 def _createFile(self):
     # This creates a file
     transaction.begin()
     Globals.deserialise(self.DIC)
     Globals.deserialise(self.DD)
     Globals.deserialise(self.DIZ)
     Globals.deserialise(self.IX)
     transaction.commit()
예제 #2
0
 def _createFile(self):
     # This creates a file
     transaction.begin()
     g = Globals["^DIC"]["B"][self.filename]
     if len(g.keys()) != 0:
         sys.stderr.write("File already exists: %s\n" % self.filename)
         sys.exit(1)
     Globals.deserialise(self.DIC)
     Globals.deserialise(self.DD)
     Globals.deserialise(self.DIZ)
     Globals.deserialise(self.IX)
     transaction.commit()
 def _createFile(self):
     # This creates a file
     transaction.begin()
     g = Globals["^DIC"]["B"][self.filename]
     if len(g.keys()) != 0:
         sys.stderr.write("File already exists: %s\n" % self.filename)
         sys.exit(1)
     Globals.deserialise(self.DIC)
     Globals.deserialise(self.DD)
     Globals.deserialise(self.DIZ)
     Globals.deserialise(self.IX)
     transaction.commit()
    def _createFile(self):
        # This creates a file
        transaction.begin()
        Globals.deserialise(self.DIC)
        Globals.deserialise(self.DD)
        Globals.deserialise(self.DIZ)
        Globals.deserialise(self.IX)
        transaction.commit()

        # Are indices setup
        dd = self.dbs.dd("PYTEST2")
        self.assertEqual(len(dd.indices), 1)
        self.assertEqual(len(dd.new_indices), 1)
예제 #5
0
    def _createFile(self):
        # This creates a file
        transaction.begin()
        Globals.deserialise(self.DIC)
        Globals.deserialise(self.DD)
        Globals.deserialise(self.DIZ)
        Globals.deserialise(self.IX)
        transaction.commit()

        # Are indices setup
        dd = self.dbs.dd("PYTEST5")
        self.assertEqual(dd.fileid, "9999907")
        self.assertEqual(len(dd.indices), 1)
예제 #6
0
    def _createFile(self):
        # This creates a file
        g = Globals["^DIC"]["B"][self.filename]
        if len(g.keys()) != 0:
            sys.stderr.write("File already exists: %s\n" % self.filename)
            sys.exit(1)
        Globals.deserialise(self.DIC)
        Globals.deserialise(self.DD)
        Globals.deserialise(self.DIZ)
        Globals.deserialise(self.IX)

        dd = self.dbs.dd("PYTEST8")
        self.assertEqual(dd.fileid, "9999914")
예제 #7
0
    def _createFile(self):
        # This creates a file
        g = Globals["^DIC"]["B"][self.filename]
        if len(g.keys()) != 0:
            sys.stderr.write("File already exists: %s\n" % self.filename)
            sys.exit(1)
        Globals.deserialise(self.DIC)
        Globals.deserialise(self.DD)
        Globals.deserialise(self.DIZ)
        Globals.deserialise(self.IX)

        dd = self.dbs.dd("PYTEST8")
        self.assertEqual(dd.fileid, "9999914")
예제 #8
0
    def _createFile(self):
        # This creates a file
        transaction.begin()
        Globals.deserialise(self.DIC)
        Globals.deserialise(self.DD)
        Globals.deserialise(self.DIZ)
        Globals.deserialise(self.IX)

        pytest = self.dbs.get_file("PYTEST20")
        for i in range(1, 11):
            pytest.insert(NAME='ROW%x' % i, TEXTLINE_ONE="%x: LINE 1" % i, TEXTLINE2="%x: LINE 2" % i)
        transaction.commit()

        # Are indices setup
        dd = self.dbs.dd("PYTEST20")
    #   self.assertEqual(len(dd.indices), 2)
        self.assertEqual(len(dd.new_indices), 1)
예제 #9
0
    def _createFile(self):
        # This creates a file
        transaction.begin()
        Globals.deserialise(self.DIC)
        Globals.deserialise(self.DD)
        Globals.deserialise(self.DIZ)
        Globals.deserialise(self.IX)

        pytest = self.dbs.get_file("PYTEST20")
        for i in range(1, 11):
            pytest.insert(NAME='ROW%x' % i,
                          TEXTLINE_ONE="%x: LINE 1" % i,
                          TEXTLINE2="%x: LINE 2" % i)
        transaction.commit()

        # Are indices setup
        dd = self.dbs.dd("PYTEST20")
        #   self.assertEqual(len(dd.indices), 2)
        self.assertEqual(len(dd.new_indices), 1)