This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, master has been updated
via 14f2aca6f34b16de19997bf7a61ce971d5ab47e5 (commit)
via dffd8dd9992d2ea8d8cb697f9f30671e42dd203a (commit)
via 1aab655005bb6a9a859aae8d3b4aaef124015e51 (commit)
via 6f1a003d27d045cd237b37d684cc17317c15d6fb (commit)
from d46347223b2a5ab154cbe3c14bc52e9915f9f5c1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceforge.net/p/sqlobject/sqlobject/ci/14f2aca6f34b16de19997bf7a61ce971d5ab47e5
commit 14f2aca6f34b16de19997bf7a61ce971d5ab47e5
Author: Oleg Broytman <ph...@ph...>
Date: Thu Oct 6 00:27:31 2016 +0300
Rename py.test -> pytest in tests and docs
diff --git a/docs/DeveloperGuide.rst b/docs/DeveloperGuide.rst
index 588c781..9d62805 100644
--- a/docs/DeveloperGuide.rst
+++ b/docs/DeveloperGuide.rst
@@ -220,7 +220,7 @@ Testing
Tests are important. Tests keep everything from falling apart. All
new additions should have tests.
-Testing uses py.test, an alternative to ``unittest``. It is available
+Testing uses pytest, an alternative to ``unittest``. It is available
at http://pytest.org/ and https://pypi.python.org/pypi/pytest. Read its
`getting started`_ document for more.
@@ -234,7 +234,7 @@ the top of ``tests/dbtest.py``).
All the tests are modules in ``sqlobject/tests``. Each module tests
one kind of feature, more or less. If you are testing a module, call
the test module ``tests/test_modulename.py`` -- only modules that
-start with ``test_`` will be picked up by py.test.
+start with ``test_`` will be picked up by pytest.
The "framework" for testing is in ``tests/dbtest``. There's a couple of
important functions:
@@ -246,7 +246,7 @@ avoid recreating tables if not necessary.
named feature. What backends support what is defined at the top of
``dbtest``.
-If you ``import *`` you'll also get py.test's version of raises_, an
+If you ``import *`` you'll also get pytest's version of raises_, an
``inserts`` function that can create instances for you, and a couple
miscellaneous functions.
diff --git a/docs/News.rst b/docs/News.rst
index 397649d..32c2a7d 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -20,11 +20,13 @@ Documentation
Tests
-----
-* Great Renaming: fix py.test warnings by renaming TestXXX classes
- to SOTestXXX to prevent py.test to recognize them as test classes.
+* Rename py.test -> pytest in tests and docs.
-* Fix py.test warnings by converting yield test to plain calls:
- yield test were deprecated in py.test.
+* Great Renaming: fix pytest warnings by renaming TestXXX classes
+ to SOTestXXX to prevent pytest to recognize them as test classes.
+
+* Fix pytest warnings by converting yield test to plain calls:
+ yield test were deprecated in pytest.
* Tests are now run at CIs with python3.5.
diff --git a/sqlobject/conftest.py b/sqlobject/conftest.py
index bcd2f7b..af39c6f 100644
--- a/sqlobject/conftest.py
+++ b/sqlobject/conftest.py
@@ -1,7 +1,4 @@
-"""
-This module is used by py.test to configure testing for this
-application.
-"""
+"""This module is used by pytest to configure testing"""
try:
import pkg_resources
diff --git a/sqlobject/inheritance/tests/test_deep_inheritance.py b/sqlobject/inheritance/tests/test_deep_inheritance.py
index f77edb2..f4e3fe5 100644
--- a/sqlobject/inheritance/tests/test_deep_inheritance.py
+++ b/sqlobject/inheritance/tests/test_deep_inheritance.py
@@ -1,4 +1,4 @@
-from py.test import raises, skip
+from pytest import raises, skip
from sqlobject import ForeignKey, MultipleJoin, StringCol
from sqlobject.inheritance import InheritableSQLObject
from sqlobject.tests.dbtest import getConnection, setupClass, supports
diff --git a/sqlobject/inheritance/tests/test_inheritance.py b/sqlobject/inheritance/tests/test_inheritance.py
index b64b3f2..898c6be 100644
--- a/sqlobject/inheritance/tests/test_inheritance.py
+++ b/sqlobject/inheritance/tests/test_inheritance.py
@@ -1,4 +1,4 @@
-from py.test import raises
+from pytest import raises
from sqlobject import IntCol, StringCol
from sqlobject.inheritance import InheritableSQLObject
from sqlobject.tests.dbtest import setupClass
diff --git a/sqlobject/tests/dbtest.py b/sqlobject/tests/dbtest.py
index bb5bb71..4279628 100644
--- a/sqlobject/tests/dbtest.py
+++ b/sqlobject/tests/dbtest.py
@@ -6,7 +6,7 @@ from __future__ import print_function
import logging
import os
import sys
-from py.test import raises, skip
+from pytest import raises, skip
import sqlobject
import sqlobject.conftest as conftest
@@ -29,7 +29,7 @@ and you can use it like::
def test_featureX():
if not supports('featureX'):
- py.test.skip("Doesn't support featureX")
+ pytest.skip("Doesn't support featureX")
"""
supportsMatrix = {
'+exceptions': 'mysql postgres sqlite',
diff --git a/sqlobject/tests/test_SQLMultipleJoin.py b/sqlobject/tests/test_SQLMultipleJoin.py
index d848772..9ee1467 100644
--- a/sqlobject/tests/test_SQLMultipleJoin.py
+++ b/sqlobject/tests/test_SQLMultipleJoin.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import ForeignKey, IntCol, MultipleJoin, SQLMultipleJoin, \
SQLObject, StringCol
from sqlobject.tests.dbtest import setupClass, supports
@@ -51,7 +51,7 @@ def test_1():
def test_multiple_join_transaction():
if not supports('transactions'):
- py.test.skip("Transactions aren't supported")
+ pytest.skip("Transactions aren't supported")
createAllTables()
trans = Race._connection.transaction()
try:
diff --git a/sqlobject/tests/test_SQLRelatedJoin.py b/sqlobject/tests/test_SQLRelatedJoin.py
index 24c367c..7620258 100644
--- a/sqlobject/tests/test_SQLRelatedJoin.py
+++ b/sqlobject/tests/test_SQLRelatedJoin.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import RelatedJoin, SQLObject, SQLRelatedJoin, StringCol
from sqlobject.tests.dbtest import setupClass, supports
@@ -51,7 +51,7 @@ def test_1():
def test_related_join_transaction():
if not supports('transactions'):
- py.test.skip("Transactions aren't supported")
+ pytest.skip("Transactions aren't supported")
createAllTables()
trans = Tourtment._connection.transaction()
try:
diff --git a/sqlobject/tests/test_auto.py b/sqlobject/tests/test_auto.py
index 8291113..f3aa6da 100644
--- a/sqlobject/tests/test_auto.py
+++ b/sqlobject/tests/test_auto.py
@@ -1,5 +1,5 @@
from datetime import datetime
-from py.test import raises
+from pytest import raises
from sqlobject import KeyCol, MultipleJoin, SQLObject, StringCol, \
classregistry, sqlmeta
diff --git a/sqlobject/tests/test_basic.py b/sqlobject/tests/test_basic.py
index fff3f2e..c44eb24 100644
--- a/sqlobject/tests/test_basic.py
+++ b/sqlobject/tests/test_basic.py
@@ -1,5 +1,5 @@
import codecs
-import py.test
+import pytest
from sqlobject import BoolCol, ForeignKey, IntCol, KeyCol, SQLObject, \
StringCol, connectionForURI, sqlhub
from sqlobject.tests.dbtest import inserts, raises, setupClass, supports
@@ -211,7 +211,7 @@ def test_foreignKeyDestroySelfCascade():
def testForeignKeyDropTableCascade():
if not supports('dropTableCascade'):
- py.test.skip("dropTableCascade isn't supported")
+ pytest.skip("dropTableCascade isn't supported")
setupClass(SOTestSO7)
setupClass(SOTestSO6)
setupClass(SOTestSO5)
diff --git a/sqlobject/tests/test_blob.py b/sqlobject/tests/test_blob.py
index 843c371..b8c2e3c 100644
--- a/sqlobject/tests/test_blob.py
+++ b/sqlobject/tests/test_blob.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import BLOBCol, SQLObject
from sqlobject.compat import PY2
from sqlobject.tests.dbtest import setupClass, supports
@@ -15,7 +15,7 @@ class ImageData(SQLObject):
def test_BLOBCol():
if not supports('blobData'):
- py.test.skip("blobData isn't supported")
+ pytest.skip("blobData isn't supported")
setupClass(ImageData)
if PY2:
data = ''.join([chr(x) for x in range(256)])
diff --git a/sqlobject/tests/test_boundattributes.py b/sqlobject/tests/test_boundattributes.py
index 3517933..5ae2015 100644
--- a/sqlobject/tests/test_boundattributes.py
+++ b/sqlobject/tests/test_boundattributes.py
@@ -1,9 +1,9 @@
-import py.test
+import pytest
from sqlobject import boundattributes
from sqlobject import declarative
-pytestmark = py.test.mark.skipif('True')
+pytestmark = pytest.mark.skipif('True')
class SOTestMe(object):
diff --git a/sqlobject/tests/test_cyclic_reference.py b/sqlobject/tests/test_cyclic_reference.py
index 3851ce2..5a4fede 100644
--- a/sqlobject/tests/test_cyclic_reference.py
+++ b/sqlobject/tests/test_cyclic_reference.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import BLOBCol, DateTimeCol, ForeignKey, IntCol, SQLObject, \
StringCol, sqlmeta
from sqlobject.tests.dbtest import getConnection, supports
@@ -30,7 +30,7 @@ class SOTestCyclicReferenceB(SQLObject):
def test_cyclic_reference():
if not supports('dropTableCascade'):
- py.test.skip("dropTableCascade isn't supported")
+ pytest.skip("dropTableCascade isn't supported")
conn = getConnection()
SOTestCyclicReferenceA.setConnection(conn)
SOTestCyclicReferenceB.setConnection(conn)
diff --git a/sqlobject/tests/test_datetime.py b/sqlobject/tests/test_datetime.py
index a6fcbcc..5f16f37 100644
--- a/sqlobject/tests/test_datetime.py
+++ b/sqlobject/tests/test_datetime.py
@@ -1,5 +1,5 @@
from datetime import datetime, date, time
-import py.test
+import pytest
from sqlobject import SQLObject
from sqlobject import col
@@ -51,7 +51,7 @@ def test_microseconds():
connection = getConnection()
if hasattr(connection, 'can_use_microseconds') and \
not connection.can_use_microseconds():
- py.test.skip(
+ pytest.skip(
"The database doesn't support microseconds; "
"microseconds are supported by MariaDB since version 5.3.0, "
"by MySQL since version 5.6.4, "
diff --git a/sqlobject/tests/test_decimal.py b/sqlobject/tests/test_decimal.py
index b8ac479..82c67e9 100644
--- a/sqlobject/tests/test_decimal.py
+++ b/sqlobject/tests/test_decimal.py
@@ -1,5 +1,5 @@
from decimal import Decimal
-import py.test
+import pytest
from sqlobject import DecimalCol, DecimalStringCol, SQLObject, UnicodeCol
from sqlobject.tests.dbtest import setupClass, supports
@@ -15,7 +15,7 @@ except NameError:
# The module was imported during documentation building
support_decimal_column = True
if not support_decimal_column:
- pytestmark = py.test.mark.skip('')
+ pytestmark = pytest.mark.skip('')
class DecimalTable(SQLObject):
diff --git a/sqlobject/tests/test_empty.py b/sqlobject/tests/test_empty.py
index b829340..c0f725f 100644
--- a/sqlobject/tests/test_empty.py
+++ b/sqlobject/tests/test_empty.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import SQLObject
from sqlobject.tests.dbtest import setupClass, supports
@@ -10,7 +10,7 @@ class EmptyClass(SQLObject):
def test_empty():
if not supports('emptyTable'):
- py.test.skip("emptyTable isn't supported")
+ pytest.skip("emptyTable isn't supported")
setupClass(EmptyClass)
e1 = EmptyClass()
e2 = EmptyClass()
diff --git a/sqlobject/tests/test_exceptions.py b/sqlobject/tests/test_exceptions.py
index 85668e5..42dd134 100644
--- a/sqlobject/tests/test_exceptions.py
+++ b/sqlobject/tests/test_exceptions.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import SQLObject, StringCol
from sqlobject.dberrors import DuplicateEntryError, ProgrammingError
from sqlobject.tests.dbtest import getConnection, raises, setupClass, supports
@@ -19,7 +19,7 @@ class SOTestExceptionWithNonexistingTable(SQLObject):
def test_exceptions():
if not supports("exceptions"):
- py.test.skip("exceptions aren't supported")
+ pytest.skip("exceptions aren't supported")
setupClass(SOTestException)
SOTestException(name="test")
raises(DuplicateEntryError, SOTestException, name="test")
diff --git a/sqlobject/tests/test_indexes.py b/sqlobject/tests/test_indexes.py
index 491936a..bb727aa 100644
--- a/sqlobject/tests/test_indexes.py
+++ b/sqlobject/tests/test_indexes.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import DatabaseIndex, ForeignKey, IntCol, MultipleJoin, \
SQLObject, StringCol
from sqlobject.dberrors import DatabaseError, IntegrityError, \
@@ -42,7 +42,7 @@ def test_indexes_1():
def test_indexes_2():
if not supports('expressionIndex'):
- py.test.skip("expressionIndex isn't supported")
+ pytest.skip("expressionIndex isn't supported")
setupClass(SOIndex2)
SOIndex2(name='')
diff --git a/sqlobject/tests/test_jsonbcol.py b/sqlobject/tests/test_jsonbcol.py
index f11ed6a..f2054d9 100644
--- a/sqlobject/tests/test_jsonbcol.py
+++ b/sqlobject/tests/test_jsonbcol.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import SQLObject, JsonbCol
from sqlobject.tests.dbtest import getConnection, setupClass
@@ -32,7 +32,7 @@ listofdictsdata = [dict(Erath=7390000000),
def test_jsonbCol():
connection = getConnection()
if connection.dbName != "postgres":
- py.test.skip("These tests require PostgreSQL")
+ pytest.skip("These tests require PostgreSQL")
setupClass([JsonbContainer], force=True)
diff --git a/sqlobject/tests/test_mysql.py b/sqlobject/tests/test_mysql.py
index b1dbfc4..59c21ca 100644
--- a/sqlobject/tests/test_mysql.py
+++ b/sqlobject/tests/test_mysql.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import SQLObject
from sqlobject.tests.dbtest import getConnection, setupClass
@@ -10,13 +10,13 @@ class SOTestSOListMySQL(SQLObject):
def test_list_databases():
connection = getConnection()
if connection.dbName != "mysql":
- py.test.skip("These tests require MySQL")
+ pytest.skip("These tests require MySQL")
assert connection.db in connection.listDatabases()
def test_list_tables():
connection = getConnection()
if connection.dbName != "mysql":
- py.test.skip("These tests require MySQL")
+ pytest.skip("These tests require MySQL")
setupClass(SOTestSOListMySQL)
assert SOTestSOListMySQL.sqlmeta.table in connection.listTables()
diff --git a/sqlobject/tests/test_paste.py b/sqlobject/tests/test_paste.py
index e32ada8..3662309 100644
--- a/sqlobject/tests/test_paste.py
+++ b/sqlobject/tests/test_paste.py
@@ -1,11 +1,11 @@
from __future__ import print_function
-import py.test
+import pytest
from sqlobject import sqlhub, SQLObject, StringCol
try:
from sqlobject.wsgi_middleware import make_middleware
except ImportError:
- pytestmark = py.test.mark.skipif('True')
+ pytestmark = pytest.mark.skipif('True')
from .dbtest import getConnection, getConnectionURI, setupClass
@@ -83,7 +83,7 @@ def test_other():
# @@: Dammit, I can't get these to pass because I can't get the
# stupid table to clear itself. setupClass() sucks. When I
# fix it I'll take this disabling out:
- py.test.skip("Oops...")
+ pytest.skip("Oops...")
assert names() == []
assert runapp(fail=False, begin=True, abort=True, use_transaction=True)
assert names() == ['app1']
diff --git a/sqlobject/tests/test_pickle.py b/sqlobject/tests/test_pickle.py
index 0e95c36..05dfc17 100644
--- a/sqlobject/tests/test_pickle.py
+++ b/sqlobject/tests/test_pickle.py
@@ -1,5 +1,5 @@
import pickle
-import py.test
+import pytest
from sqlobject import IntCol, SQLObject, StringCol
from sqlobject.tests.dbtest import getConnection, raises, setupClass
@@ -33,7 +33,7 @@ def test_pickleCol():
assert test.answer == test_answer
if (connection.dbName == 'sqlite') and connection._memory:
- py.test.skip("The following test requires a different connection")
+ pytest.skip("The following test requires a different connection")
test = SOTestPickle.get(
test.id,
diff --git a/sqlobject/tests/test_picklecol.py b/sqlobject/tests/test_picklecol.py
index 976ffa0..f4eb932 100644
--- a/sqlobject/tests/test_picklecol.py
+++ b/sqlobject/tests/test_picklecol.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import PickleCol, SQLObject
from sqlobject.tests.dbtest import setupClass, supports
@@ -23,7 +23,7 @@ class PickleContainer(SQLObject):
def test_pickleCol():
if not supports('blobData'):
- py.test.skip("blobData isn't supported")
+ pytest.skip("blobData isn't supported")
setupClass([PickleContainer], force=True)
mypickledata = PickleData()
diff --git a/sqlobject/tests/test_postgres.py b/sqlobject/tests/test_postgres.py
index 73e5670..06c8835 100644
--- a/sqlobject/tests/test_postgres.py
+++ b/sqlobject/tests/test_postgres.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
from sqlobject import SQLObject, StringCol
from sqlobject.tests.dbtest import getConnection, setupClass
@@ -17,7 +17,7 @@ def test_sslmode():
connection = SOTestSSLMode._connection
if (connection.dbName != 'postgres') or \
(not connection.module.__name__.startswith('psycopg')):
- py.test.skip("The test requires PostgreSQL, psycopg and ssl mode")
+ pytest.skip("The test requires PostgreSQL, psycopg and ssl mode")
connection = getConnection(sslmode='require')
SOTestSSLMode._connection = connection
@@ -40,13 +40,13 @@ class SOTestSOList(SQLObject):
def test_list_databases():
connection = getConnection()
if connection.dbName != "postgres":
- py.test.skip("These tests require PostgreSQL")
+ pytest.skip("These tests require PostgreSQL")
assert connection.db in connection.listDatabases()
def test_list_tables():
connection = getConnection()
if connection.dbName != "postgres":
- py.test.skip("These tests require PostgreSQL")
+ pytest.skip("These tests require PostgreSQL")
setupClass(SOTestSOList)
assert SOTestSOList.sqlmeta.table in connection.listTables()
diff --git a/sqlobject/tests/test_schema.py b/sqlobject/tests/test_schema.py
index 3b1aac5..4a7887d 100644
--- a/sqlobject/tests/test_schema.py
+++ b/sqlobject/tests/test_schema.py
@@ -1,4 +1,4 @@
-import py.test
+import pytest
... 700 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|