old_contents: from .tabulate import find_columns
  
  
  def test_find_columns():
      assert find_columns(10) == "1 2 3 4 5 6 7 8 9 10"
  
new_contents: from .tabulate import find_columns, pad, MISSING, concat, symbol, columnize
  
  
  def test_pad():
      assert pad("HW2", 12345) == "HW2  ", "should pad to the left to the width of the number"
      assert pad("HW2", 1) == "HW2", "should not trim the string if the number is shorter"
      assert pad(MISSING, 12345) == (MISSING * 5), "should use MISSING if given"
  
  
  def test_find_columns():
      assert find_columns(10) == "1 2 3 4 5 6 7 8 9 10", "should return incremental numbers between 1 and the argument"
  
  
  def test_symbol():
      assert symbol({'number': 5, 'status': 'success'}) == '5', "return the number for sucessful assignments"
      assert symbol({'number': 5, 'status': 'missing'}) == MISSING, "returns MISSING for missing assignments"
      assert symbol({'number': 5, 'status': 'partial'}) == '5', "returns the raw number ift stdout can't handle fanciness"
  
  
  def test_concat():
      assert concat([
          {'number': 1, 'status': 'success'},
          {'number': 2, 'status': 'success'},
      ], 2) == "1 2", "should turn an assignment list into a string"
  
      assert concat([
          {'number': 1, 'status': 'success'},
          {'number': 2, 'status': 'success'},
      ], 6) == "1 2 - - - -", "should output hyphens when no assignments are given"
  
      assert concat([
          {'number': 1, 'status': 'success'},
          {'number': 6, 'status': 'success'},
      ], 6) == "1 - - - - 6", "should handle missing assignments in between others"
  
      assert concat([
          {'number': 10, 'status': 'success'},
          {'number': 11, 'status': 'success'},
      ], 12) == "- - - - - - - - - 10 11 --", "should output two hyphens for two-digit numbers"
  
  
  def test_columnize():
      student = {
          'username': 'rives',
          'unmerged_branches': False,
          'homeworks': [
              {'number': 1, 'status': 'success'},
              {'number': 2, 'status': 'success'},
          ],
          'labs': [
              {'number': 1, 'status': 'success'},
          ]
      }
  
      assert columnize(student, 'rives', 2, 1) == "rives  | 1 2 | 1"
      assert columnize(student, 'long_username', 2, 1) == "rives          | 1 2 | 1"
      assert columnize(student, 'rives', 5, 1) == "rives  | 1 2 - - - | 1"
      assert columnize(student, 'rives', 2, 5) == "rives  | 1 2 | 1 - - - -"
  
subject: add tests for about half of tabulate