[Django] #31736: PostgreSQL InspectDB tests due to assuming it only runs on Linux

43 views
Skip to first unread message

Django

unread,
Jun 23, 2020, 8:57:37 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB tests due to assuming it only runs on Linux
-------------------------------------+-------------------------------------
Reporter: Ahmad A. | Owner: nobody
Hussein |
Type: Bug | Status: assigned
Component: Testing | Version: master
framework | Keywords: postgresql,
Severity: Normal | inspectdb
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/31736>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 23, 2020, 8:59:09 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB tests due to assuming it only runs on Linux
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: nobody
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
inspectdb | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Ahmad A. Hussein:

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>

Django

unread,
Jun 23, 2020, 9:00:30 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB tests due to assuming it only runs on Linux
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: nobody
Type: Bug | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
inspectdb | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Ahmad A. Hussein:

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>

Django

unread,
Jun 23, 2020, 9:00:52 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB tests due to assuming it only runs on Linux
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: nobody
Type: Bug | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
inspectdb | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Ahmad A. Hussein:

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>

Django

unread,
Jun 23, 2020, 9:01:56 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB test fails due to assuming it only runs on Linux
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: nobody
Type: Bug | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
inspectdb | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:4>

Django

unread,
Jun 23, 2020, 9:08:36 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB test fails due to assuming it only runs on Linux
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: Ahmad A.

| Hussein
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage:
inspectdb | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmad A. Hussein):

* owner: nobody => Ahmad A. Hussein


--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:5>

Django

unread,
Jun 23, 2020, 10:43:39 AM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB test fails on Windows.

-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: Ahmad A.
| Hussein
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: postgresql, | Triage Stage: Accepted
inspectdb |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/13102 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/31736#comment:6>

Django

unread,
Jun 23, 2020, 3:00:12 PM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB test fails on Windows.
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: Ahmad A.
| Hussein
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: postgresql, | Triage Stage: Accepted
inspectdb |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* 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>

Django

unread,
Jun 23, 2020, 3:00:41 PM6/23/20
to django-...@googlegroups.com
#31736: PostgreSQL InspectDB test fails on Windows.
-------------------------------------+-------------------------------------
Reporter: Ahmad A. Hussein | Owner: Ahmad A.
| Hussein
Type: Bug | Status: closed
Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed
Keywords: postgresql, | Triage Stage: Accepted
inspectdb |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages