Commit Graph

10 Commits

Author SHA1 Message Date
Hynek Schlawack b337f5b9d5 Move test helpers into an utils module
__init__.py should never contain any code.
2016-08-15 15:27:13 +02:00
Hynek Schlawack 3051fbfcd3 Minor fixes 2015-07-26 12:32:02 +02:00
Samuel A. Falvo II 765a97466d Review feedback 2015-07-26 11:29:54 +02:00
Samuel A. Falvo II 0abd302cb2 Support optional values through a new validator.
Unfortunately, I'm unable to run tests locally b/c of severe dependency
hell.  I am unable to get tox, detox, python setup.py test, and other
means of running tests to work at all.  So, since I'm blocked on a
project by the lack of optional validator support, I am going to close
my eyes, look away, and pull the trigger, and hope I hit the target.

If someone who has a working Python configuration can please be kind
enough to let me know if my changes fail any tests, I'd be very
appreciative.

Even better, I'd love to know why a stock Python distribution with
dependencies installed is incapable of running the tests for attrs.
However, this isn't the right forum to answer that question.

(This PR has the 17+ debugging commits cleaned up.)
2015-07-26 11:29:53 +02:00
Hynek Schlawack 980067d8f1 We're ASCII-clean 2015-02-20 11:22:10 +01:00
Hynek Schlawack 08ff764de7 Pass instances into validators
Also construct the instance first and then run all validators on it.

This allows for cross-attribute validation.
2015-02-09 13:16:56 +01:00
Hynek Schlawack 477f1782b6 Add tests for provides's repr 2015-01-29 19:41:58 +01:00
Hynek Schlawack 8bb430cf18 Add basic support for zope.interface 2015-01-29 19:04:23 +01:00
Hynek Schlawack 8f98b38136 Increase branch coverage
And a lot of under the hood work.
2015-01-29 17:31:49 +01:00
Hynek Schlawack 692e4613a0 Add instance_of validator 2015-01-29 12:20:17 +01:00