Opened 4 years ago

Last modified 4 years ago

#31736 closed Bug

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

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 (last modified by Ahmad A. Hussein)

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. Patch fixes this by generalizing the test to use os.devnull to be OS-agnostic instead of /dev/null always.

Change History (1)

comment:1 by Ahmad A. Hussein, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top