def test_not_same_contents(self): dup1 = self.create_file('src/dup1.proto', dedent(''' package com.twitter.lean; option java_multiple_files = true; enum Jake { FOO=1;} message joe_bob {} ''')) dup2 = self.create_file('src/dup2.proto', dedent(''' package com.twitter.lean; message joe_bob {} ''')) self.assertFalse(_same_contents(dup1, dup2))
def test_not_same_contents(self): with temporary_dir() as workdir: with open(os.path.join(workdir, 'dup1.proto'), 'w') as dup1: dup1.write(dedent(''' package com.twitter.lean; option java_multiple_files = true; enum Jake { FOO=1;} message joe_bob {} ''')) with open(os.path.join(workdir, 'dup2.proto'), 'w') as dup2: dup2.write(dedent(''' package com.twitter.lean; message joe_bob {} ''')) self.assertFalse(_same_contents(dup1.name, dup2.name))
def test_not_same_contents(self): with temporary_dir() as workdir: with open(os.path.join(workdir, 'dup1.proto'), 'w') as dup1: dup1.write( dedent(''' package com.twitter.lean; option java_multiple_files = true; enum Jake { FOO=1;} message joe_bob {} ''')) with open(os.path.join(workdir, 'dup2.proto'), 'w') as dup2: dup2.write( dedent(''' package com.twitter.lean; message joe_bob {} ''')) self.assertFalse(_same_contents(dup1.name, dup2.name))