import codecs
import io
import sys

from workshopper.problems import BaseProblem


class Problem(BaseProblem):

    def test(self, file):
        old_stdout = sys.stdout
        sys.stdout = io.StringIO()
        eval(codecs.open(file).read())
        message = sys.stdout.getvalue()
        sys.stdout = old_stdout
        assert message == 'Hello World\n'

import codecs
import io
import sys

from workshopper.problems import BaseProblem


class Problem(BaseProblem):
    title = 'Print method'

    def test(self, file):
        old_stdout = sys.stdout
        sys.stdout = io.StringIO()
        eval(codecs.open(file).read())
        message = sys.stdout.getvalue()
        sys.stdout = old_stdout
        assert message == 'Hello World\n'

Add a title to the print_method problem
Add a title to the print_method problem

  import codecs
  import io
  import sys
  
  from workshopper.problems import BaseProblem
  
  
  class Problem(BaseProblem):
+     title = 'Print method'
  
      def test(self, file):
          old_stdout = sys.stdout
          sys.stdout = io.StringIO()
          eval(codecs.open(file).read())
          message = sys.stdout.getvalue()
          sys.stdout = old_stdout
          assert message == 'Hello World\n'
  
Add a title to the print_method problem
## Code Before:
import codecs
import io
import sys

from workshopper.problems import BaseProblem


class Problem(BaseProblem):

    def test(self, file):
        old_stdout = sys.stdout
        sys.stdout = io.StringIO()
        eval(codecs.open(file).read())
        message = sys.stdout.getvalue()
        sys.stdout = old_stdout
        assert message == 'Hello World\n'

## Instruction:
Add a title to the print_method problem
## Code After:
import codecs
import io
import sys

from workshopper.problems import BaseProblem


class Problem(BaseProblem):
    title = 'Print method'

    def test(self, file):
        old_stdout = sys.stdout
        sys.stdout = io.StringIO()
        eval(codecs.open(file).read())
        message = sys.stdout.getvalue()
        sys.stdout = old_stdout
        assert message == 'Hello World\n'
