Skip to content

Run Structure and Behavior tests in Python 3 #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: python
python:
- "2.7"
- "3.5"
- "3.6"
- "nightly"
install: pip install tox-travis
script: tox
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
packages=['fluent', 'fluent.syntax', 'fluent.migrate'],
package_data={
'fluent.migrate': ['cldr_data/*']
}
)
},
tests_require=['six']
)
6 changes: 3 additions & 3 deletions tests/syntax/test_behavior.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from __future__ import unicode_literals
from six import with_metaclass

import os
import re
import sys
Expand Down Expand Up @@ -99,7 +101,5 @@ def test(self):
return type.__new__(mcs, name, bases, attrs)


class TestBehavior(unittest.TestCase):
class TestBehavior(with_metaclass(TestBehaviorMeta, unittest.TestCase)):
maxDiff = None

__metaclass__ = TestBehaviorMeta
6 changes: 3 additions & 3 deletions tests/syntax/test_structure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from __future__ import unicode_literals
from six import with_metaclass

import os
import sys
import json
Expand Down Expand Up @@ -50,7 +52,5 @@ def test(self):
return type.__new__(mcs, name, bases, attrs)


class TestStructure(unittest.TestCase):
class TestStructure(with_metaclass(TestStructureMeta, unittest.TestCase)):
maxDiff = None

__metaclass__ = TestStructureMeta
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist = py27, py27-cl, py36
envlist = py27, py27-cl, py35, py36
skipsdist=True

[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
six
cl: compare-locales

commands=python -m unittest discover