<commit_before>desc: Tests for the basic usage of the division operation
tests:

    # Python supports the overloaded operator '/' in both directions
    - py: [(r.expr(4) / 2), (4 / r.expr(2))]
      js: r(4).div(2)
      rb: (r 4) / 2
      ot: 2

    - py: r.expr(-1) / -2
      js: r(-1).div(-2)
      rb: (r -1) / -2
      ot: 0.5

    - py: r.expr(4.9) / 0.7
      js: r(4.9).div(0.7)
      rb: (r 4.9) / 0.7
      ot: 4.9 / 0.7

    # All arithmetic operations (except mod) actually support arbitrary arguments
    # but this feature can't be accessed in Python because it's operators are binary
    - js: r(1).div(2,3,4,5)
      ot: 1/120

    # Type errors
    - py: r.expr('a') / 0.8
      js: r('a').div(0.8)
      ot: err('RqlRuntimeError', 'Expected type NUMBER but found STRING.', [0])<commit_msg>Adding divide by zero test<commit_after>desc: Tests for the basic usage of the division operation
tests:

    # Python supports the overloaded operator '/' in both directions
    - py: [(r.expr(4) / 2), (4 / r.expr(2))]
      js: r(4).div(2)
      rb: (r 4) / 2
      ot: 2

    - py: r.expr(-1) / -2
      js: r(-1).div(-2)
      rb: (r -1) / -2
      ot: 0.5

    - py: r.expr(4.9) / 0.7
      js: r(4.9).div(0.7)
      rb: (r 4.9) / 0.7
      ot: 4.9 / 0.7

    # All arithmetic operations (except mod) actually support arbitrary arguments
    # but this feature can't be accessed in Python because it's operators are binary
    - js: r(1).div(2,3,4,5)
      ot: 1/120

    # Divide by zero test
    - cd: [r.expr(1).div(0), r.expr(2.0).div(0), r.expr(3).div(0.0), r.expr(4.0).div(0.0), r.expr(0).div(0), r.expr(0.0).div(0.0)]
      ot: err('RqlRuntimeError', 'Cannot divide by zero', [1])

    # Type errors
    - py: r.expr('a') / 0.8
      js: r('a').div(0.8)
      ot: err('RqlRuntimeError', 'Expected type NUMBER but found STRING.', [0])
{'fraction_non_alphanumeric': 0.1804956896551724, 'fraction_numerical': 0.06088362068965517, 'mean_word_length': 2.0796019900497513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5308293', 'n_tokens_mistral': 777, 'n_tokens_neox': 724, 'n_words': 216}