Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-13 Thread Scott David Daniels
rator function in unittest. Here is where the recipe is, for those who want to comment further: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466288 --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-13 Thread Scott David Daniels
Fredrik Lundh wrote: > Scott David Daniels wrote: >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466288 > > my main nit is the name: the test isn't broken in itself, and doesn't need > to be fixed; it's just not expected to succeed at this time

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-14 Thread Scott David Daniels
Fred L. Drake, Jr. wrote: > Scott David Daniels wrote: > > Would "expect_fail", "expect_failure", "expected_fail", or > > "expected_failure", work for you? > > None of these use the same naming convention as the other unittest

Re: [Python-Dev] str with base

2006-01-19 Thread Scott David Daniels
erting to base-64 and other weird formats, as well as providing decimal conversion into some unicode number ranges outside the ASCII group. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

[Python-Dev] Path PEP -- a couple of typos.

2006-02-04 Thread Scott David Daniels
ext >lib_dir = "/lib" >libs = glob.glob(os.path.join(lib_dir, "*s.o")) >==> >lib_dir = Path("/lib") >libs = lib_dir.files("*.so") Probably that should be: ... libs = glob.g

Re: [Python-Dev] math.areclose ...?

2006-02-05 Thread Scott David Daniels
ative_tolerance. As to the equation itself, wouldn't a symmetric version be somewhat better? def nearby(x, y, rel_tol=1.e-5, abs_tol=1.e-8): return abs(x - y) < abs_tol + rel_tol * (abs(x) + abs(y)) This avoids areclose(0, 1e-8) != areclose(1e-8, 0), for example. --Scott David

Re: [Python-Dev] math.areclose ...?

2006-02-08 Thread Scott David Daniels
difference <= max(abs(x), abs(y)) * relative_tol) I use <=, since "zero-tolerance" should pass equal values. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

<    1   2