Skip to content

Conversation

@timsaucer
Copy link
Member

If we attempt to create a table in the server that already exists, either by table name or location, we should fail.

@timsaucer timsaucer added 🔨 testing testing and benchmarks exclude from changelog PRs with this won't show up in CHANGELOG.md labels Dec 1, 2025
@timsaucer timsaucer requested a review from abey79 December 1, 2025 21:46
assert returned_field.metadata == original_field.metadata


def test_create_existing_table_fails(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc you're going to have to mark this one as creates_table, otherwise it'll break DPF ci.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? It doesn't actually create any tables.



def test_create_existing_table_fails(
prefilled_catalog: PrefilledCatalog, entry_factory: EntryFactory, tmp_path: pathlib.Path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefilled_catalog already contains an EntryFactory, so you can use prefilled_catalog.factory instead of having the explicit fixture.

Also, not necessary for this PR, but EntryFactory could have introspection APIs to list entries created so far. Could be occasionally convenient, eg when you want to trigger a collision like in this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exclude from changelog PRs with this won't show up in CHANGELOG.md 🔨 testing testing and benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants