コード例 #1
0
ファイル: test.py プロジェクト: yokuba/emulambda
 def test_load_stdin(self):
     try:
         sys.stdin = io.BytesIO(b"testdata")
         result = emulambda.read_file_to_string('-')
         assert result == "testdata"
     except BaseException as e:
         self.fail("We failed to read standard input.\n%s" % e.message)
コード例 #2
0
ファイル: test.py プロジェクト: fugue/emulambda
 def test_load_stdin(self):
     try:
         sys.stdin = io.BytesIO(b"testdata")
         result = emulambda.read_file_to_string("-")
         assert result == "testdata"
     except BaseException as e:
         self.fail("We failed to read standard input.\n%s" % e.message)
コード例 #3
0
ファイル: test.py プロジェクト: yokuba/emulambda
 def test_load_file(self):
     try:
         emulambda.read_file_to_string(__file__)
         assert True
     except BaseException as e:
         self.fail("We failed to read a file.\n%s" % e.message)
コード例 #4
0
ファイル: test.py プロジェクト: fugue/emulambda
 def test_load_file(self):
     try:
         emulambda.read_file_to_string(__file__)
         assert True
     except BaseException as e:
         self.fail("We failed to read a file.\n%s" % e.message)