Skip to content

Commit

Permalink
Merge branch 'master' into NamedExpr_support
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jul 10, 2020
2 parents cfd303f + a31c557 commit a846192
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,6 +5,7 @@

#PyENV
/.python-version
pyvenv.cfg

# Packages / zc.buildout
*.egg
Expand Down Expand Up @@ -70,3 +71,4 @@ node_modules/

# MAC specifics
.DS_Store
default.profraw
4 changes: 0 additions & 4 deletions setup.cfg
Expand Up @@ -19,7 +19,6 @@ test = pytest
[tool:pytest]
addopts =
testpaths =
.
tests

norecursedirs = fixures
Expand All @@ -31,9 +30,6 @@ force_single_line = True
line_length = 200
lines_after_imports = 2

not_skip =
__init__.py

[flake8]
ignore =
# W503 line break before binary operator: is no longer requested by PEP-8
Expand Down
8 changes: 4 additions & 4 deletions tests/builtins/test_utilities.py
@@ -1,24 +1,24 @@
import math
import random
import string


def test_string_in_utility_builtins():
import string
from RestrictedPython.Utilities import utility_builtins
assert utility_builtins['string'] is string


def test_math_in_utility_builtins():
import math
from RestrictedPython.Utilities import utility_builtins
assert utility_builtins['math'] is math


def test_whrandom_in_utility_builtins():
import random
from RestrictedPython.Utilities import utility_builtins
assert utility_builtins['whrandom'] is random


def test_random_in_utility_builtins():
import random
from RestrictedPython.Utilities import utility_builtins
assert utility_builtins['random'] is random

Expand Down
14 changes: 11 additions & 3 deletions tox.ini
Expand Up @@ -39,6 +39,15 @@ deps =
-cconstraints.txt
coverage

depends =
py27,
py35,
py36,
py36-datetime,
py37,
py38,
py39,

setenv =
COVERAGE_FILE=.coverage

Expand All @@ -56,7 +65,7 @@ deps =
isort

commands =
isort --apply --recursive {toxinidir}/src {toxinidir}/tests {posargs}
isort --apply {toxinidir}/src {toxinidir}/tests {posargs}

[testenv:autopep8]
skip_install = true
Expand Down Expand Up @@ -84,12 +93,11 @@ deps =
flake8-deprecated
flake8-pytest
flake8-todo
flake8-isort
mccabe

commands =
mkdir -p {toxinidir}/_build/flake8
- isort --check-only --recursive {toxinidir}/src {toxinidir}/tests setup.py
- isort --check-only --diff {toxinidir}/src {toxinidir}/tests setup.py
- flake8 --format=html --htmldir={toxinidir}/_build/flake8 --doctests src tests setup.py
flake8 src tests setup.py --doctests

Expand Down

0 comments on commit a846192

Please sign in to comment.