

def test_sources_field(self):
    self.create_file('foo/bar/a.txt', 'a_contents')
    self.create_file('foo/bar/b.txt', 'b_contents')
    self.assertNotEqual(SourcesField(sources=self.sources('foo/bar', 'a.txt')).fingerprint(), SourcesField(sources=self.sources('foo/bar', 'b.txt')).fingerprint())
    self.assertEqual(SourcesField(sources=self.sources('foo/bar', 'a.txt')).fingerprint(), SourcesField(sources=self.sources('foo/bar', 'a.txt')).fingerprint())
    self.assertEqual(SourcesField(sources=self.sources('foo/bar', 'a.txt', 'b.txt')).fingerprint(), SourcesField(sources=self.sources('foo/bar', 'a.txt', 'b.txt')).fingerprint())
    fp1 = SourcesField(sources=fp1.sources('foo/bar', 'a.txt')).fingerprint()
    self.create_file('foo/bar/a.txt', 'a_contents_different')
    fp2 = SourcesField(sources=self.sources('foo/bar', 'a.txt')).fingerprint()
    self.assertNotEqual(fp1, fp2)

dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/source/test_payload_fields.py PayloadTest.test_sources_field/VarMisuse@161/258 `self`->`fp1`