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)
 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)
 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)
 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)
Ejemplo n.º 5
0
 def test_cat(self):
     self.assertEqual(self.content, solution.cat())
Ejemplo n.º 6
0
 def test_cat(self):
     self.assertEqual("tests", solution.cat(self.filename))
Ejemplo n.º 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']))
Ejemplo n.º 8
0
	def test_cat_command(self):
		self.file.write("Test some text")
		self.file.close()
		self.assertEqual("Test some text",cat(self.name))
Ejemplo n.º 9
0
 def test_cat(self):
     self.assertEqual(self.content, solution.cat())
Ejemplo n.º 10
0
 def test_cat_contents(self):
     self.assertEqual("you should see this", cat(self.filename))
Ejemplo n.º 11
0
 def test_cat(self):
     self.assertEqual("Hi my name is Dayana!", cat('filename.txt'))
Ejemplo n.º 12
0
 def test_with_text_file(self):
     self.assertEqual(solution.cat('text_file.txt'), self.text)
Ejemplo n.º 13
0
 def test_cat_command(self):
     self.file.write("Test some text")
     self.file.close()
     self.assertEqual("Test some text", cat(self.name))
Ejemplo n.º 14
0
 def test_cat(self):
     result = cat("test_file")
     self.assertEqual("just a simple text for testing", result)