Results for “break”

Showing 11–15 of 15

  1. Challenge

    Edge cases

    …ordinary cases, then for the edges, where real programs break. Ordinary lists Below the function, write assert checks for an ordinary list of readings and for a list with only one value. Include a…

    Write the code Medium 2 stages testing assert edge cases None
  2. Challenge

    Test the alert levels

    …. Leave the function exactly as it is: the hidden tests break copies of it and expect your checks to notice. On the thresholds Bugs hide at the boundaries. Add checks for the values exactly on each…

    Write the code Medium 2 stages testing assert functions boundaries
  3. Challenge

    Log to a file

    …read it line by line and print each line without its line break: [T+00:10:00] INFO Orbit insertion complete [T+00:12:05] WARN Battery 3 temperature high [T+00:14:47] ERROR Fuel valve 2 not responding…

    Write the code Easy 2 stages files open with write
  4. Challenge

    Test the error

    …the arithmetic is, and like the arithmetic it can quietly break. Write the test that keeps it honest. The hidden tests run your checks against broken versions of the function to see whether they…

    Write the code Medium 2 stages testing assert try except
  5. Challenge

    Live T-minus

    …the number of seconds it formats was typed in by hand at breakfast. Feed it the real time left, from the launch time and the clock. From the clock Replace remaining_s = 8100 with the real time left…

    Write the code Medium 2 stages datetime datetime.now timezone countdown