Ad
  • Custom User Avatar

    Still having same issue here.
    Most tests work fine, except when "not" is introduced, it seems.

  • Custom User Avatar

    im facing the same problem.

  • Custom User Avatar
    test.expect(not xo('xxxoo'), 'False expected')
                 not    False             ^ 
                    True            This is only shown if xo('xxxoo') returned True and not xo('xxxoo') was False instead
    
  • Default User Avatar

    Thank you for your response, I'm sorry I'm not sure what you mean by that? I'm not getting an error message, my question is about why the test question expects False when the negation of the ox statement should be true.

  • Custom User Avatar

    So far, you understood how it works. The error message is shown if the first argument of test.expect isn't True.

  • Custom User Avatar

    No, it isn't, read how match works.

  • Custom User Avatar

    This this is telling me str.match() does not have a length property, that's wrong

  • Default User Avatar

    Hello! Am I being totally daft? For the 3rd example it says: 'test.expect(not xo('xxxoo'), 'False expected')
    However xo returns a bool saying True for same number of x's and o's
    This means that xo('xxxoo') should return False (as the numbers are not equal) meaning that not xo('xxxoo') should return True (negation).
    I'm obviously missing something.
    Help very much appreciated.