Opened 4 years ago

Last modified 4 years ago

#31736 closed Bug

PostgreSQL InspectDB tests due to assuming it only runs on Linux — at Initial Version

Reported by: Ahmad A. Hussein Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords: postgresql, inspectdb
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

On Windows, inspectdb..tests.InspectDBTransactionalTests.test_foreign_data_wrapper fails with the following error:

`
The error was: could not open file "/dev/null" for reading: No such file or directory
HINT: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.

AssertionError: 'class InspectdbIrisForeignTable(models.Model):' not found in [...]
`
This is because of the way the test is written as [pointed out by](https://github.com/django/django/pull/12646#issuecomment-647944821). Patch fixes this by generalizing the test to use os.devnull to be OS-agnostic instead of /dev/null always.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top