コード例 #1
0
 def test_cat2(self):
     self.filename = "v2.txt"
     file = open(self.filename, "w")
     content = ""
     file.write(content)
     file.close()
     self.assertEqual("", solution.cat(self.filename))
     os.remove(self.filename)
コード例 #2
0
 def test_cat1(self):
     self.filename = "v1.txt"
     file = open(self.filename, "w")
     content = "Hello, I am a test file"
     file.write(content)
     file.close()
     self.assertEqual("Hello, I am a test file", solution.cat(self.filename))
     os.remove(self.filename)
コード例 #3
0
 def test_cat2(self):
     self.filename = "v2.txt"
     file = open(self.filename, "w")
     content = ""
     file.write(content)
     file.close()
     self.assertEqual("", solution.cat(self.filename))
     os.remove(self.filename)
コード例 #4
0
 def test_cat1(self):
     self.filename = "v1.txt"
     file = open(self.filename, "w")
     content = "Hello, I am a test file"
     file.write(content)
     file.close()
     self.assertEqual("Hello, I am a test file",
                      solution.cat(self.filename))
     os.remove(self.filename)
コード例 #5
0
ファイル: tests.py プロジェクト: EmilianStankov/HackBulgaria
 def test_cat(self):
     self.assertEqual(self.content, solution.cat())
コード例 #6
0
ファイル: tests.py プロジェクト: snejy/Programming101
 def test_cat(self):
     self.assertEqual("tests", solution.cat(self.filename))
コード例 #7
0
 def test_cat_helper(self):
     self.assertEqual( "There is more than one file or no arguments.", cat([]))
     self.assertEqual("Some content.", cat(['cat', 'test_file']))
     self.assertEqual(self.content, cat(['cat', 'file.txt']))
コード例 #8
0
	def test_cat_command(self):
		self.file.write("Test some text")
		self.file.close()
		self.assertEqual("Test some text",cat(self.name))
コード例 #9
0
ファイル: tests.py プロジェクト: EmilianStankov/HackBulgaria
 def test_cat(self):
     self.assertEqual(self.content, solution.cat())
コード例 #10
0
ファイル: test.py プロジェクト: hadt0786/HackBulgaria
 def test_cat_contents(self):
     self.assertEqual("you should see this", cat(self.filename))
コード例 #11
0
 def test_cat(self):
     self.assertEqual("Hi my name is Dayana!", cat('filename.txt'))
コード例 #12
0
ファイル: tests.py プロジェクト: egzheleva/HackBulgariaPython
 def test_with_text_file(self):
     self.assertEqual(solution.cat('text_file.txt'), self.text)
コード例 #13
0
 def test_cat_command(self):
     self.file.write("Test some text")
     self.file.close()
     self.assertEqual("Test some text", cat(self.name))
コード例 #14
0
 def test_cat(self):
     result = cat("test_file")
     self.assertEqual("just a simple text for testing", result)