fireplace icon indicating copy to clipboard operation
fireplace copied to clipboard

test indexerror

Open curtank opened this issue 8 years ago • 3 comments

I install fireplace run py.test then got this error all of the tests failed because of this error

f:\Anaconda3\lib\random.py:255: IndexError ---------------------------- Captured stderr call ----------------------------- [fireplace.utils]: Initializing a new game !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! to show a full traceback on KeyboardInterrupt use --fulltrace f:\Anaconda3\lib\ast.py:217: KeyboardInterrupt =============== 179 failed, 2 passed, 1 error in 58.69 seconds ================

Example:

self = <random.Random object at 0x0000015A2FE34718>, seq = []

def choice(self, seq):
    """Choose a random element from a non-empty sequence."""
    try:
        i = self._randbelow(len(seq))
    except ValueError:
      raise IndexError('Cannot choose from an empty sequence')

E IndexError: Cannot choose from an empty sequence

curtank avatar Feb 06 '17 15:02 curtank

Do you get it every time? What's the version?

jleclanche avatar Feb 06 '17 15:02 jleclanche

yes ,I try reinstall twice , windows 10 pro python 3.5.0

curtank avatar Feb 06 '17 15:02 curtank

@curtank is it happening again in the latest hearthstone moule and fireplace project?

tonyyyye avatar May 11 '18 08:05 tonyyyye

Too old and can not get it again.

shinoi2 avatar Nov 27 '23 03:11 shinoi2