Skip to content

Commit 8100312

Browse files
authored
Revert "include tests in installed package (#232)" (#233)
This reverts commit 84a5015 and commit 4816526. RestrictedPython intentionally does not include tests anymore See discussion on #231 and #232
1 parent 4816526 commit 8100312

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+64
-83
lines changed

.meta.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ testenv-setenv = [
2929
testenv-commands = [
3030
"python -V",
3131
"pip list",
32-
"pytest --cov=src --cov-report= {posargs}",
32+
"pytest --cov=src --cov=tests --cov-report= {posargs}",
3333
]
3434
testenv-additional = [
3535
"",
@@ -51,7 +51,7 @@ testenv-additional = [
5151
"depends = py36,py37,py38,py39,py39-datetime,py310,py311,coverage",
5252
]
5353
coverage-basepython = "python3.8"
54-
coverage-command = "pytest --cov=src --cov-report= {posargs}"
54+
coverage-command = "pytest --cov=src --cov=tests --cov-report= {posargs}"
5555
coverage-setenv = [
5656
"COVERAGE_FILE=.coverage",
5757
]
@@ -64,6 +64,7 @@ additional-rules = [
6464
"recursive-include docs *.ast",
6565
"recursive-include docs *.bat",
6666
"recursive-include docs *.jpg",
67+
"recursive-include tests *.py",
6768
]
6869

6970
[check-manifest]

CHANGES.rst

Lines changed: 0 additions & 3 deletions

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ recursive-include src *.py
1515
recursive-include docs *.ast
1616
recursive-include docs *.bat
1717
recursive-include docs *.jpg
18+
recursive-include tests *.py

src/RestrictedPython/tests/transformer/__init__.py

Whitespace-only changes.

src/RestrictedPython/tests/transformer/operators/__init__.py

Whitespace-only changes.
File renamed without changes.

src/RestrictedPython/tests/builtins/test_limits.py renamed to tests/builtins/test_limits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import pytest
2-
31
from RestrictedPython.Limits import limited_list
42
from RestrictedPython.Limits import limited_range
53
from RestrictedPython.Limits import limited_tuple
64

5+
import pytest
6+
77

88
def test_limited_range_length_1():
99
result = limited_range(1)

src/RestrictedPython/tests/helper.py renamed to tests/helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import RestrictedPython.Guards
21
from RestrictedPython import compile_restricted_eval
32
from RestrictedPython import compile_restricted_exec
43

4+
import RestrictedPython.Guards
5+
56

67
def _compile(compile_func, source):
78
"""Compile some source with a compile func."""

src/RestrictedPython/tests/test_Guards.py renamed to tests/test_Guards.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import pytest
2-
31
from RestrictedPython import compile_restricted_exec
42
from RestrictedPython.Guards import guarded_unpack_sequence
53
from RestrictedPython.Guards import safe_builtins
64
from RestrictedPython.Guards import safe_globals
75
from RestrictedPython.Guards import safer_getattr
6+
from tests.helper import restricted_eval
7+
from tests.helper import restricted_exec
88

9-
from .helper import restricted_eval
10-
from .helper import restricted_exec
9+
import pytest
1110

1211

1312
def _write_(x):

0 commit comments

Comments
 (0)