Skip to content

Commit

Permalink
Merge pull request beeware#333 from freakboy3742/master
Browse files Browse the repository at this point in the history
Threw a dryer sheet into the code.
  • Loading branch information
freakboy3742 authored Dec 17, 2016
2 parents 2f8e5e1 + d261dd1 commit b606bba
Show file tree
Hide file tree
Showing 41 changed files with 1,713 additions and 683 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ install:
- "pip install ."
- "pip install pytest"
- "pip install git+https://github.com/pybee/pytest-circleci"
- "pip install flake8"
script:
- "py.test tests"
- flake8
18 changes: 8 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[isort]
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
line_length = 79
multi_line_output = 5
not_skip = __init__.py
known_standard_library = marshal
known_first_party = voc
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
[flake8]
# https://flake8.readthedocs.org/en/latest/
exclude=local/*,docs/*,settings.py,*/migrations/*
max-complexity = 10
max-line-length = 119
ignore = E121,E123,E126,E226,E24,E704,W503,W504,C901
[metadata]
description-file = README.md
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/usr/bin/env python3
import sys

if sys.version_info[:2] < (3, 4):
raise SystemExit("VOC requires Python 3.4+")

import io
import re
from setuptools import setup, find_packages
import sys

if sys.version_info[:2] < (3, 4):
raise SystemExit("VOC requires Python 3.4+")

with io.open('./voc/__init__.py', encoding='utf8') as version_file:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M)
Expand Down
2 changes: 1 addition & 1 deletion tests/builtins/test_input.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .. utils import TranspileTestCase, BuiltinFunctionTestCase
from .. utils import TranspileTestCase # , BuiltinFunctionTestCase


class InputTests(TranspileTestCase):
Expand Down
2 changes: 0 additions & 2 deletions tests/builtins/test_next.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from .. utils import TranspileTestCase, BuiltinFunctionTestCase


Expand Down
2 changes: 0 additions & 2 deletions tests/builtins/test_pow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from .. utils import TranspileTestCase, BuiltinFunctionTestCase, BuiltinTwoargFunctionTestCase


Expand Down
2 changes: 1 addition & 1 deletion tests/builtins/test_setattr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .. utils import TranspileTestCase, BuiltinTwoargFunctionTestCase
from .. utils import TranspileTestCase


class SetattrTests(TranspileTestCase):
Expand Down
2 changes: 0 additions & 2 deletions tests/builtins/test_sum.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from .. utils import TranspileTestCase, BuiltinFunctionTestCase


Expand Down
2 changes: 0 additions & 2 deletions tests/datatypes/test_bytearray.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase


Expand Down
2 changes: 0 additions & 2 deletions tests/datatypes/test_bytes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase


Expand Down
1 change: 0 additions & 1 deletion tests/datatypes/test_complex.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase

from unittest import expectedFailure

class UnaryComplexOperationTests(UnaryOperationTestCase, TranspileTestCase):
data_type = 'complex'
Expand Down
2 changes: 0 additions & 2 deletions tests/datatypes/test_float.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase


Expand Down
2 changes: 0 additions & 2 deletions tests/datatypes/test_frozenset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase

import unittest


class FrozensetTests(TranspileTestCase):
pass
Expand Down
8 changes: 3 additions & 5 deletions tests/datatypes/test_str.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase


Expand Down Expand Up @@ -29,10 +28,9 @@ def test_endswith(self):
print(s.endswith(end))
""")


#self.assertCodeExecution("""
# print('abracadabra'.endswith('abra'))
# """)
# self.assertCodeExecution("""
# print('abracadabra'.endswith('abra'))
# """)

def test_getattr(self):
self.assertCodeExecution("""
Expand Down
2 changes: 1 addition & 1 deletion tests/structures/test_assert.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def test_assert_without_message(self):
print("Pre assert 2")
assert x < 0
print("Done.")
""")
""")
2 changes: 0 additions & 2 deletions tests/structures/test_decorators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unittest import expectedFailure

from ..utils import TranspileTestCase


Expand Down
3 changes: 2 additions & 1 deletion tests/structures/test_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class MyException(Exception):

@expectedFailure
def test_raise_custom_exception_import_from(self):
self.assertCodeExecution("""
self.assertCodeExecution(
"""
from example import *
try:
Expand Down
Loading

0 comments on commit b606bba

Please sign in to comment.