a4a114760a0be2028e82a98ab5f70c8f0e757faa,src/python/pants/option/option_value_container_test.py,OptionValueContainerTest,test_value_ranking,#OptionValueContainerTest#,20

Before Change


            o.bar

    def test_value_ranking(self) -> None:
        o = OptionValueContainer()
        o.foo = RankedValue(Rank.CONFIG, 11)
        self.assertEqual(11, o.foo)
        self.assertEqual(Rank.CONFIG, o.get_rank("foo"))
        o.foo = RankedValue(Rank.HARDCODED, 22)
        self.assertEqual(11, o.foo)

After Change


            o.bar

    def test_value_ranking(self) -> None:
        ob = OptionValueContainerBuilder()
        ob.foo = RankedValue(Rank.CONFIG, 11)
        o = ob.build()
        self.assertEqual(11, o.foo)
        self.assertEqual(Rank.CONFIG, o.get_rank("foo"))
        ob.foo = RankedValue(Rank.HARDCODED, 22)
        o = ob.build()
        self.assertEqual(11, o.foo)
        self.assertEqual(Rank.CONFIG, o.get_rank("foo"))
        ob.foo = RankedValue(Rank.ENVIRONMENT, 33)
        o = ob.build()
        self.assertEqual(33, o.foo)
        self.assertEqual(Rank.ENVIRONMENT, o.get_rank("foo"))
        ob.foo = RankedValue(Rank.FLAG, 44)
        o = ob.build()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: pantsbuild/pants
Commit Name: a4a114760a0be2028e82a98ab5f70c8f0e757faa
Time: 2020-09-21
Author: stuhood@gmail.com
File Name: src/python/pants/option/option_value_container_test.py
Class Name: OptionValueContainerTest
Method Name: test_value_ranking


Project Name: pantsbuild/pants
Commit Name: a4a114760a0be2028e82a98ab5f70c8f0e757faa
Time: 2020-09-21
Author: stuhood@gmail.com
File Name: src/python/pants/option/option_value_container_test.py
Class Name: OptionValueContainerTest
Method Name: test_value_ranking


Project Name: pantsbuild/pants
Commit Name: a4a114760a0be2028e82a98ab5f70c8f0e757faa
Time: 2020-09-21
Author: stuhood@gmail.com
File Name: src/python/pants/option/option_value_container_test.py
Class Name: OptionValueContainerTest
Method Name: test_indexing


Project Name: pantsbuild/pants
Commit Name: a4a114760a0be2028e82a98ab5f70c8f0e757faa
Time: 2020-09-21
Author: stuhood@gmail.com
File Name: src/python/pants/option/option_value_container_test.py
Class Name: OptionValueContainerTest
Method Name: test_unknown_values