Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def test_BioSQL::DupLoadTest::test_duplicate_load (   self )
Make sure can't import a single record twice (in one go).

Definition at line 409 of file test_BioSQL.py.

        """Make sure can't import a single record twice (in one go)."""
        record = SeqRecord(Seq("ATGCTATGACTAT", Alphabet.generic_dna),id="Test1")
            count = self.db.load([record,record])
        except Exception, err:
            #Note we don't do a specific exception handler because the
            #exception class will depend on which DB back end is in use.            
            self.assertTrue(err.__class__.__name__ in ["IntegrityError",
        raise Exception("Should have failed! Loaded %i records" % count)

Generated by  Doxygen 1.6.0   Back to index