| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I renamed the tests (that's why their name ends with `2`) there where methods
with the same names around line 1600.
The other tests assure that a TypeError is raised when calling
`pow(x, y, proxy)` because "a PyProxy cannot lie about its type".
Interestingly the deleted tests did not fail on CPython but the tests expecting
the TypeError were locally successful, too, but not at GHA – that's strange.
I am restoring here the status before my renaming of the tests: The now deleted
tests did not run because of the name clash.
|
|
|
|
| |
Add support for Python 3.9.
|
|
|
|
| |
Fixes #71
|
|
|
|
| |
Fixes https://github.com/zopefoundation/zope.interface/issues/141
|
|
|
|
|
|
|
|
| |
Dict item iterators use a special type (builtins.dict_itemiterator) on
recent versions of PyPy3.
Fixes zope.security.interfaces.ForbiddenAttribute: ('__next__',
<dict_itemiterator object at 0x00007f7c9c107320>)
|
| |
|
|
|
|
| |
Fixes #55
|
|
|
|
|
|
| |
implements it
This facilitates adding adapter registrations for the system user.
|
|
|
|
|
|
|
|
|
| |
Just like the C implementation. Note that ``__str__`` is checked for
both implementations on both Python 2 and 3, but if there is no
``__unicode__`` method defined, Python 2's automatic fallback to
``__str__`` is **not** checked when ``unicode`` is called.
Add tests for these cases.
|
|
|
|
|
|
|
|
|
|
| |
And test this. This applies to both the class and the ZCML directive.
Also adjust IPermission to use NativeStringLine for ``id``, since
that's what ZCML has always been creating (it uses an Id, which
subclasses NativeStringLine), and what's typically written in source
code. Test that the permissions created from ZCML are valid with this
change.
|
|
|
|
|
|
| |
where it was a i18n messageid).
TIL that sphinx.ext.doctest has IGNORE_EXCEPTION_DETAIL set by default.
|
|
|
|
|
|
|
|
| |
And suggest workarounds, in a prominent new section about proxy troubles.
Link to this from everywhere we talk about proxies.
Fixes #26
|
|
|
|
|
|
| |
It's not doctested so it isn't fully guaranteed to be correct, but it
was relying on conpects that don't exist anymore (simpleinteraction,
and the ISecurityPolicy having the checkPermission() method).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
And use it consistently throughout this package.
On Python 2, sometimes we were comparing the string with unicode and
sometimes with str. Now its consistent.
This is a start to addressing #6
|
|
|
|
|
|
| |
Also run all remaining tests on all Python versions.
Trivial trailing/keyword arg whitespace cleanups.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- The implementation of __getattribute__/__getattr__ now behaves like
C and will not call a target's version of those functions more than
once if they raise an AttributeError.
|
| |
|
| |
|
|
|
|
| |
zope.location is a hard test dependency, no need for conditional logic.
|
|
|
|
|
| |
- Modern assert methods
- Unify some py2/py3 tests that just depended on a method name.
|
|
|
|
|
|
| |
- Modern assert methods
- Whitespace cleanup
- A whole test class was being skipped because of a duplicate name.
|
|
|
|
|
|
| |
- Use dict comprehensions
- Use moddern self.assertIs
- Unify external imports
|
| |
|
| |
|
| |
|
|
|
|
| |
We have hard test dependencies, we don't need to be conditional.
|
|
|
|
|
|
| |
Add an explicit test for this case.
Fixes #19.
|
|\
| |
| | |
call PyObject_GC_UnTrack() in tp_dealloc()
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
see the following sites for details:
* https://bugs.python.org/issue31095
* https://github.com/python/cpython/pull/2974
Fixes #35.
|
| | |
|
|/
|
|
|
|
| |
Fixes #8.
Test environments still to come.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some minor cleanups and simplifications to test_proxy.py:
- use loadTestsFromName() and wrap the conditional test in
@unittest.skipIf. This gets environments closer to running the same
number of tests, which helps when comparing to make sure nothing
gets skipped.
- Break compound assertions in test_coerce out into separate
assertions for ease of reading and debuging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We have u'literals' so we don't need a _u() function.
For the record the Emacs replacement regex was
`_u(\(['"]\)\([^)]*\)\1) -> u\1\2\1`. Amazingly, I typed that right
on the first try.
A few things were only used in one (test) file or function, so it was
better to keep the use, if any, local and out of the "public" api:
- We can use io.StringIO everywhere and it's fast. It was only
imported in one file anyway.
- We can just import pickle. It was only imported in one file anyway.
- TEXT was only used in one test function, `type(u'')` is just as
clear (especially since the usual name is `text_type`).
- reload was only used in one test function, so move the definition
there.
|
|\
| |
| | |
Fix TypeError handling for ProxyPy.
|
| |
| |
| |
| |
| |
| |
| | |
Also add additional tests clarifying how the str-to-repr fallthrough
works.
Fixes #7
|
| | |
|
|/
|
|
|
|
|
|
|
| |
Also rename all the test classes in test_checker for consistency. I
changed the test_suite function to not call them out by name and
noticed the number of tests run dropped. At first I thought it had
something to do with test class names or inheritance, so I made them
all consistent. But it turned out that the manual list actually had
some duplicates in it.
|