Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue 9816: Random.jumpahead(n) didn't work well for small values of n. | Raymond Hettinger | 2010-09-10 | 1 | -2/+0 |
| | |||||
* | Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are | Florent Xicluna | 2010-03-07 | 1 | -2/+1 |
| | | | | effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings. | ||||
* | Remove unused imports in test modules. | Georg Brandl | 2010-02-07 | 1 | -1/+1 |
| | |||||
* | #7092: Silence more py3k warnings. Patch by Florent Xicluna. | Ezio Melotti | 2010-02-03 | 1 | -0/+1 |
| | |||||
* | use assert[Not]In where appropriate | Ezio Melotti | 2010-01-23 | 1 | -2/+2 |
| | |||||
* | Reverting the Revision: 77368. I committed Flox's big patch for tests by | Senthil Kumaran | 2010-01-08 | 1 | -1/+0 |
| | | | | mistake. ( It may come in for sure tough) | ||||
* | Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵ | Senthil Kumaran | 2010-01-08 | 1 | -0/+1 |
| | | | | Patch by flox | ||||
* | Silence py3k warning claiming to affect the random module | Antoine Pitrou | 2009-10-14 | 1 | -4/+6 |
| | |||||
* | convert usage of fail* to assert* | Benjamin Peterson | 2009-06-30 | 1 | -18/+18 |
| | |||||
* | Inline coefficients in gamma(). Add reflection formula. Add comments. | Raymond Hettinger | 2009-02-19 | 1 | -10/+18 |
| | |||||
* | warnings.catch_warnings() now returns a list or None instead of the custom | Brett Cannon | 2008-09-09 | 1 | -1/+1 |
| | | | | | | | | WarningsRecorder object. This makes the API simpler to use as no special object must be learned. Closes issue 3781. Review by Benjamin Peterson. | ||||
* | Rename math.sum to math.fsum | Mark Dickinson | 2008-07-30 | 1 | -1/+1 |
| | |||||
* | Improve accuracy of gamma test function | Raymond Hettinger | 2008-07-19 | 1 | -5/+3 |
| | |||||
* | Issue 1681432: Add triangular distribution the random module. | Raymond Hettinger | 2008-03-23 | 1 | -0/+2 |
| | |||||
* | Issue #1727780: Support loading pickles of random.Random objects created | Martin v. Löwis | 2007-12-03 | 1 | -0/+13 |
| | | | | | | on 32-bit systems on 64-bit systems, and vice versa. As a consequence of the change, Random pickles created by Python 2.6 cannot be loaded in Python 2.5. | ||||
* | Remove test.test_support.guard_warnings_filter. | Brett Cannon | 2007-08-14 | 1 | -1/+1 |
| | | | | | | | | test.test_support.catch_warning is more full-featured and provides the same functionality. Since guard_warnings_filter was added in 2.6 there is no backwards-compatibility issues. | ||||
* | Bug #1486663: don't reject keyword arguments for subclasses of builtin | Georg Brandl | 2007-01-21 | 1 | -0/+8 |
| | | | | types. | ||||
* | Bug #1590891: random.randrange don't return correct value for big number | Raymond Hettinger | 2006-12-20 | 1 | -0/+8 |
| | | | | Needs to be backported. | ||||
* | Add test.test_support.guard_warnings_filter . This function returns a context | Brett Cannon | 2006-12-13 | 1 | -4/+3 |
| | | | | | manager that protects warnings.filter from being modified once the context is exited. | ||||
* | Another crack at bug #1460340: make random.sample(dict) | Tim Peters | 2006-04-01 | 1 | -2/+18 |
| | | | | work, this time by ugly brute force. | ||||
* | SF bug #1460340: random.sample can raise KeyError | Raymond Hettinger | 2006-03-29 | 1 | -0/+3 |
| | | | | Fix the hit and miss style of testing for sets and dicts. | ||||
* | Use floor division operator. | Raymond Hettinger | 2004-09-27 | 1 | -1/+1 |
| | |||||
* | SF #1027105: HardwareRandom should be renamed OSRandom | Raymond Hettinger | 2004-09-13 | 1 | -4/+4 |
| | | | | | | Renamed the new generator at Trevor's recommendation. The name HardwareRandom suggested a bit more than it delivered (no radioactive decay detectors or such). | ||||
* | Fulfill Martin's request to use try/except rather than a "look before | Raymond Hettinger | 2004-09-05 | 1 | -1/+5 |
| | | | | you leap" approach. Makes the early call to os.urandom() unnecessary. | ||||
* | SF bug #1022010: Import random fails | Raymond Hettinger | 2004-09-04 | 1 | -3/+6 |
| | | | | | * Complete the previous patch by making sure that the MachineRandom tests are only run when the underlying resource is available. | ||||
* | Teach the random module about os.urandom(). | Raymond Hettinger | 2004-08-30 | 1 | -0/+102 |
| | | | | | * Use it for seeding when it is available. * Provide an alternate generator based on it. | ||||
* | Add some tests for corner cases. | Raymond Hettinger | 2004-07-09 | 1 | -1/+25 |
| | |||||
* | * Migrate set() and frozenset() from the sandbox. | Raymond Hettinger | 2003-11-16 | 1 | -8/+6 |
| | | | | | | | | * Install the unittests, docs, newsitem, include file, and makefile update. * Exercise the new functions whereever sets.py was being used. Includes the docs for libfuncs.tex. Separate docs for the types are forthcoming. | ||||
* | SF bug #812202: randint is always even | Raymond Hettinger | 2003-10-05 | 1 | -0/+78 |
| | | | | | | | * Added C coded getrandbits(k) method that runs in linear time. * Call the new method from randrange() for ranges >= 2**53. * Adds a warning for generators not defining getrandbits() whenever they have a call to randrange() with too large of a population. | ||||
* | SF bug #801342: Bug (documentation or real, your choice) in random.sample. | Raymond Hettinger | 2003-09-06 | 1 | -0/+10 |
| | | | | | | | | | | | | random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding. | ||||
* | SF bug #778964: bad seed in python 2.3 random | Raymond Hettinger | 2003-08-09 | 1 | -1/+1 |
| | | | | | | | The default seed is time.time(). Multiplied by 256 before truncating so that fractional seconds are used. This way, two successive calls to random.seed() are much more likely to produce different sequences. | ||||
* | SF bug #759889: Pickling of Random is broken | Raymond Hettinger | 2003-06-24 | 1 | -0/+7 |
| | | | | | * Implement __reduce__() to support pickling. * Add a test case to prove a successful roundtrip through pickle. | ||||
* | Apply the simplified test_support boilerplate. | Raymond Hettinger | 2003-05-03 | 1 | -6/+4 |
| | |||||
* | Simplify ref count test. | Raymond Hettinger | 2003-05-02 | 1 | -3/+3 |
| | |||||
* | SF bug #690083: test_random fails sometimes | Raymond Hettinger | 2003-02-21 | 1 | -1/+1 |
| | | | | | | time.sleep(1) sometimes delays for fractionally less than a second resulting in too short of an interval for C's time.time() function to create a distinct seed. | ||||
* | Add refcount test. | Raymond Hettinger | 2003-02-04 | 1 | -3/+12 |
| | |||||
* | * Migrate sample distribution test from random.py to test_random.py. | Raymond Hettinger | 2003-01-17 | 1 | -5/+22 |
| | | | | * Use Sets module to more clearly articulate a couple of tests. | ||||
* | Move the statistical tests for four distributions into the unittest suite. | Raymond Hettinger | 2003-01-05 | 1 | -0/+41 |
| | |||||
* | Add a test case. | Raymond Hettinger | 2003-01-05 | 1 | -0/+19 |
| | |||||
* | Test an edge case for sample(). | Raymond Hettinger | 2003-01-04 | 1 | -0/+1 |
| | |||||
* | SF patch 658251: Install a C implementation of the Mersenne Twister as the | Raymond Hettinger | 2002-12-29 | 1 | -14/+201 |
| | | | | core generator for random.py. | ||||
* | Get rid of relative imports in all unittests. Now anything that | Barry Warsaw | 2002-07-23 | 1 | -1/+1 |
| | | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :) | ||||
* | random.gauss() uses a piece of hidden state used by nothing else, | Tim Peters | 2002-05-05 | 1 | -0/+19 |
and the .seed() and .whseed() methods failed to reset it. In other words, setting the seed didn't completely determine the sequence of results produced by random.gauss(). It does now. Programs repeatedly mixing calls to a seed method with calls to gauss() may see different results now. Bugfix candidate (random.gauss() has always been broken in this way), despite that it may change results. |