Ad
  • Custom User Avatar

    The same test exists in at least javascript.

  • Default User Avatar

    Sorry I didn't specify, yes in Python. Also, what trashy_incel said.

  • Default User Avatar

    there is this annoying fixed test in Python:

    test.assert_equals(check_coupon(0,False,'September 5, 2014','September 25, 2014'), False);
    

    In Python, False == 0 and True == 1 (because bool inherits from int), so checking if the codes are equal with == fails this test. It's technically a user error, since you have to know how booleans work in Python, however it could be argued this test is just an annoyance that adds nothing to the core task, which is to compare dates. and you only find out about it when submitting, it's no mentionned in the description or sample tests

  • Custom User Avatar

    Which language are you refering to?

  • Default User Avatar

    To fix this from the testing side, whoever set up the tests should be using == (value comparison) instead of is (reference comparison) to compare strings. If this is not a deliberate decision on their part, it's a mistake in the test setup.