#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 <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.606007a825e1d666b9e622d2f707d5d6%40djangoproject.com.

Reply via email to