```
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31736>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old 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.
New 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
[https://github.com/django/django/pull/12646#issuecomment-647944821/
pointed out by]. Patch fixes this by generalizing the test to use
os.devnull to be OS-agnostic instead of /dev/null always.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:1>
Old 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
> [https://github.com/django/django/pull/12646#issuecomment-647944821/
> pointed out by]. Patch fixes this by generalizing the test to use
> os.devnull to be OS-agnostic instead of /dev/null always.
New 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
[https://github.com/django/django/pull/12646#issuecomment-647944821/
pointed out by]. Patch fixes this by generalizing the test to use
os.devnull to be OS-agnostic instead of /dev/null always.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:2>
Old 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
> [https://github.com/django/django/pull/12646#issuecomment-647944821/
> pointed out by]. Patch fixes this by generalizing the test to use
> os.devnull to be OS-agnostic instead of /dev/null always.
New 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
[https://github.com/django/django/pull/12646#issuecomment-647944821/
pointed out by Nick Pope]. Patch fixes this by generalizing the test to
use os.devnull to be OS-agnostic instead of /dev/null always.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:3>
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:4>
* owner: nobody => Ahmad A. Hussein
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:5>
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/13102 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"798835112d81b852efaae0e067af389c733cd1b3" 79883511]:
{{{
#!CommitTicketReference repository=""
revision="798835112d81b852efaae0e067af389c733cd1b3"
Fixed #31736 -- Fixed
InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:7>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"ac0ff7d7001bdf2c6669857ea184656d097bd603" ac0ff7d]:
{{{
#!CommitTicketReference repository=""
revision="ac0ff7d7001bdf2c6669857ea184656d097bd603"
[3.1.x] Fixed #31736 -- Fixed
InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.
Backport of 798835112d81b852efaae0e067af389c733cd1b3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:8>