(self, connection)
| 518 | @testing.requires.sequences_as_server_defaults |
| 519 | @testing.provide_metadata |
| 520 | def test_shared_sequence(self, connection): |
| 521 | # test case for #6071 |
| 522 | common_seq = normalize_sequence( |
| 523 | config, Sequence("common_sequence", metadata=self.metadata) |
| 524 | ) |
| 525 | Table( |
| 526 | "table_1", |
| 527 | self.metadata, |
| 528 | Column( |
| 529 | "id", |
| 530 | Integer, |
| 531 | common_seq, |
| 532 | server_default=common_seq.next_value(), |
| 533 | primary_key=True, |
| 534 | ), |
| 535 | ) |
| 536 | Table( |
| 537 | "table_2", |
| 538 | self.metadata, |
| 539 | Column( |
| 540 | "id", |
| 541 | Integer, |
| 542 | common_seq, |
| 543 | server_default=common_seq.next_value(), |
| 544 | primary_key=True, |
| 545 | ), |
| 546 | ) |
| 547 | |
| 548 | self.metadata.create_all(connection) |
| 549 | is_true(self._has_sequence(connection, "common_sequence")) |
| 550 | is_true(testing.db.dialect.has_table(connection, "table_1")) |
| 551 | is_true(testing.db.dialect.has_table(connection, "table_2")) |
| 552 | self.metadata.drop_all(connection) |
| 553 | is_false(self._has_sequence(connection, "common_sequence")) |
| 554 | is_false(testing.db.dialect.has_table(connection, "table_1")) |
| 555 | is_false(testing.db.dialect.has_table(connection, "table_2")) |
| 556 | |
| 557 | def test_next_value_type(self): |
| 558 | seq = normalize_sequence( |
nothing calls this directly
no test coverage detected