old_contents: # coding: utf-8
  
  from pyccel.parser import Parser
  import os
  import sys
  
  PY2 = sys.version_info[0] == 2
  PY3 = sys.version_info[0] == 3
  
  def test_semantic():
      base_dir = os.path.dirname(os.path.realpath(__file__))
      path_dir = os.path.join(base_dir, 'scripts/semantic')
  
      files = sorted(os.listdir(path_dir))
      files = [f for f in files if (f.endswith(".py"))]
  
      if PY3:
          # not working with python3
          _ignored = ['classes.py']
          files = [f for f in files if not (f in _ignored)]
  
      for f in files:
          print('> testing {0}'.format(str(f)))
          f_name = os.path.join(path_dir, f)
  
          pyccel = Parser(f_name)
          ast = pyccel.parse()
  
          settings = {}
          ast = pyccel.annotate(**settings)
  
  ######################
  if __name__ == '__main__':
      test_semantic()
  
new_contents: # coding: utf-8
  
  from pyccel.parser import Parser
  import os
  import sys
  
  PY2 = sys.version_info[0] == 2
  PY3 = sys.version_info[0] == 3
  
  def test_semantic():
      base_dir = os.path.dirname(os.path.realpath(__file__))
      path_dir = os.path.join(base_dir, 'scripts')
  
      files = sorted(os.listdir(path_dir))
      files = [f for f in files if (f.endswith(".py"))]
  
      if PY3:
          # not working with python3
          _ignored = ['classes.py']
          files = [f for f in files if not (f in _ignored)]
  
      for f in files:
          print('> testing {0}'.format(str(f)))
          f_name = os.path.join(path_dir, f)
  
          pyccel = Parser(f_name)
          ast = pyccel.parse()
  
          settings = {}
          ast = pyccel.annotate(**settings)
  
  ######################
  if __name__ == '__main__':
      test_semantic()
  
subject: update test_semantics