Skip to content

Commit

Permalink
Merge 098b91e into 1a1ee6e
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSkriblovsky committed Aug 23, 2020
2 parents 1a1ee6e + 098b91e commit 4aee3ef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 48 deletions.
37 changes: 6 additions & 31 deletions .travis.yml
@@ -1,15 +1,14 @@
language: python
python:
- "2.7"
- "3.5"
- "pypy"
- "3.8"
- "pypy3"


env:
- TOX_ENV=tw166
- TOX_ENV=tw175
- TOX_ENV=tw179
- TOX_ENV=tw189
- TOX_ENV=tw1910
- TOX_ENV=tw203
- TOX_ENV=twlatest
- TOX_ENV=twtrunk

Expand All @@ -18,38 +17,14 @@ matrix:
fast_finish: true
allow_failures:
- env: TOX_ENV=pyflakes
- python: pypy
env: TOX_ENV=twtrunk
- python: pypy3
env: TOX_ENV=twtrunk

exclude:
- python: 2.7
env: TOX_ENV=twlatest
- python: 2.7
env: TOX_ENV=twtrunk

include:
- python: 3.5
- python: 3.8
env: TOX_ENV=pyflakes
- python: 3.5
- python: 3.8
env: TOX_ENV=manifest
- python: 3.4
env: TOX_ENV=tw179
- python: 3.4
env: TOX_ENV=tw166
- python: 2.7
env: TOX_ENV=tw140
- python: 2.7
env: TOX_ENV=tw150
- python: 2.7
env: TOX_ENV=tw155
- python: pypy
env: TOX_ENV=tw140
- python: pypy
env: TOX_ENV=tw150
- python: pypy
env: TOX_ENV=tw155



Expand Down
6 changes: 2 additions & 4 deletions tests/mongod.py
Expand Up @@ -20,7 +20,6 @@

from twisted.python.compat import intToBytes
from twisted.python.filepath import FilePath
from twisted.python.compat import _PY3
from twisted.internet import defer, reactor
from twisted.internet.error import ProcessDone

Expand Down Expand Up @@ -53,9 +52,8 @@ def __init__(self, port=27017, auth=False, replset=None, dbpath=None, args=()):
self.__datadir = dbpath
self.__rmdatadir = False

if _PY3:
# Ensure it is always bytes
self.__datadir = FilePath(self.__datadir).asBytesMode().path
# Ensure it is always bytes
self.__datadir = FilePath(self.__datadir).asBytesMode().path


def start(self):
Expand Down
6 changes: 1 addition & 5 deletions tests/test_objects.py
Expand Up @@ -28,7 +28,6 @@
from txmongo._gridfs.errors import NoFile
from twisted.trial import unittest
from twisted.internet import defer
from twisted.python.compat import _PY3
try:
from twisted._version import version as twisted_version
except ImportError:
Expand All @@ -45,10 +44,7 @@ def test_MongoObjects(self):
conn = yield txmongo.MongoConnection(mongo_host, mongo_port)
mydb = conn.mydb
self.assertEqual(isinstance(mydb, database.Database), True)
if _PY3:
self.assertEqual(repr(mydb), "Database(Connection('127.0.0.1', 27017), 'mydb')")
else:
self.assertEqual(repr(mydb), "Database(Connection('127.0.0.1', 27017), u'mydb')")
self.assertEqual(repr(mydb), "Database(Connection('127.0.0.1', 27017), 'mydb')")
self.assertEqual(repr(mydb("mydb2")), repr(mydb.__call__("mydb2")))
mycol = mydb.mycol
self.assertEqual(isinstance(mycol, collection.Collection), True)
Expand Down
12 changes: 4 additions & 8 deletions tox.ini
@@ -1,7 +1,6 @@
[tox]
envlist =
{tw155,tw150,tw140},
{tw166,tw175,tw179,twtrunk,twlatest},
{tw189,tw1910,tw203,twtrunk,twlatest},
pyflakes, manifest


Expand All @@ -14,12 +13,9 @@ deps =
pycrypto
twlatest: Twisted
twtrunk: https://github.com/twisted/twisted/archive/trunk.zip
tw179: Twisted==17.9.0
tw175: Twisted==17.5.0
tw166: Twisted==16.6.0
tw155: Twisted==15.5
tw150: Twisted==15.0
tw140: Twisted==14.0
tw203: Twisted==20.3.0
tw1910: Twisted==19.10.0
tw189: Twisted==18.9.0
setenv =
PYTHONPATH = {toxinidir}
commands =
Expand Down

0 comments on commit 4aee3ef

Please sign in to comment.