Issue: unit test failures
Author: keredson
State: closed
Created: 2016-06-02 18:24:03

i keep getting semi-random failures in the test suite.  example:

```
======================================================================
ERROR: test_array_iterables (playhouse.tests.test_postgres.TestArrayField)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/derek/projects/peewee/playhouse/tests/base.py", line 285, in setUp
    test_db.create_tables(self.requires)
  File "/home/derek/projects/peewee/peewee.py", line 3574, in create_tables
    create_model_tables(models, fail_silently=safe)
  File "/home/derek/projects/peewee/peewee.py", line 4940, in create_model_tables
    m.create_table(**create_table_kwargs)
  File "/home/derek/projects/peewee/peewee.py", line 4624, in create_table
    db.create_table(cls)
  File "/home/derek/projects/peewee/peewee.py", line 3571, in create_table
    return self.execute_sql(*qc.create_table(model_class, safe))
  File "/home/derek/projects/peewee/peewee.py", line 3492, in execute_sql
    self.commit()
  File "/home/derek/projects/peewee/peewee.py", line 3316, in __exit__
    reraise(new_type, new_type(*exc_args), traceback)
  File "/home/derek/projects/peewee/peewee.py", line 3485, in execute_sql
    cursor.execute(sql, params or ())
OperationalError: attempt to write a readonly database
```

which is very odd as it's happening testing the sqlite engine:

```
$ python runtests.py -a -e sqlite
```

all the failures are in the `test_postgres` module.  are they supposed to run at all when testing the sqlite engine?

debugging shows it's not able to write to `/tmp/peewee_test.db`, which i do have permission to write to:

```
$ ls -l /tmp/peewee_test.db
-rw-r--r-- 1 derek derek 52224 Jun  2 13:13 /tmp/peewee_test.db
```

has anyone run across this before?  this is happening on a clean copy of 2.8.1 (7670c9e).


This was fixed on May 20th, e4bd8e6cb04abc826143ac64dfd9ef1bc186f070


ic, thanks.

i'm still getting 4 failures in `playhouse.tests.test_extra_fields`:

```
======================================================================
ERROR: test_valid_password (playhouse.tests.test_extra_fields.TestPasswordFields)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/derek/projects/peewee/playhouse/tests/test_extra_fields.py", line 143, in setUp
    super(TestPasswordFields, self).setUp()
  File "/home/derek/projects/peewee/playhouse/tests/base.py", line 285, in setUp
    test_db.create_tables(self.requires)
  File "/home/derek/projects/peewee/peewee.py", line 3574, in create_tables
    create_model_tables(models, fail_silently=safe)
  File "/home/derek/projects/peewee/peewee.py", line 4940, in create_model_tables
    m.create_table(**create_table_kwargs)
  File "/home/derek/projects/peewee/peewee.py", line 4624, in create_table
    db.create_table(cls)
  File "/home/derek/projects/peewee/peewee.py", line 3571, in create_table
    return self.execute_sql(*qc.create_table(model_class, safe))
  File "/home/derek/projects/peewee/peewee.py", line 3492, in execute_sql
    self.commit()
  File "/home/derek/projects/peewee/peewee.py", line 3316, in __exit__
    reraise(new_type, new_type(*exc_args), traceback)
  File "/home/derek/projects/peewee/peewee.py", line 3485, in execute_sql
    cursor.execute(sql, params or ())
OperationalError: attempt to write a readonly database
```

both off of 2.8.1 w/ that commit cherry-picked, and your current master.