コード例 #1
0
    def test_showdiff_ints_colorizing_is_not_stringwise(self):
        commands._showdiff('field', 222, 333, True)
        complete_diff = self.io.getoutput().split()[1]

        commands._showdiff('field', 222, 232, True)
        partial_diff = self.io.getoutput().split()[1]

        self.assertEqual(complete_diff, partial_diff)
コード例 #2
0
ファイル: test_ui.py プロジェクト: nidico/beets
    def test_showdiff_ints_colorizing_is_not_stringwise(self):
        commands._showdiff('field', 222, 333, True)
        complete_diff = self.io.getoutput().split()[1]

        commands._showdiff('field', 222, 232, True)
        partial_diff = self.io.getoutput().split()[1]

        self.assertEqual(complete_diff, partial_diff)
コード例 #3
0
ファイル: test_ui.py プロジェクト: nidico/beets
 def test_showdiff_identical(self):
     commands._showdiff('field', 'old', 'old', True)
     out = self.io.getoutput()
     self.assertFalse('field' in out)
コード例 #4
0
ファイル: test_ui.py プロジェクト: Tantali/beets
 def test_showdiff_strings(self):
     commands._showdiff('field', 'old', 'new')
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #5
0
 def test_showdiff_floats_differenct(self):
     commands._showdiff('field', 1.999, 4.001, True)
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #6
0
ファイル: test_ui.py プロジェクト: mrmachine/beets
 def test_showdiff_ints(self):
     commands._showdiff("field", 2, 3)
     out = self.io.getoutput()
     self.assertTrue("field" in out)
コード例 #7
0
ファイル: test_ui.py プロジェクト: nidico/beets
 def test_showdiff_floats_differenct(self):
     commands._showdiff('field', 1.999, 4.001, True)
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #8
0
ファイル: test_ui.py プロジェクト: nidico/beets
 def test_showdiff_shows_both(self):
     commands._showdiff('field', 'old', 'new', True)
     out = self.io.getoutput()
     self.assertTrue('old' in out)
     self.assertTrue('new' in out)
コード例 #9
0
 def test_showdiff_ints(self):
     commands._showdiff('field', 2, 3, True)
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #10
0
 def test_showdiff_identical(self):
     commands._showdiff('field', 'old', 'old', True)
     out = self.io.getoutput()
     self.assertFalse('field' in out)
コード例 #11
0
 def test_showdiff_strings(self):
     commands._showdiff('field', 'old', 'new')
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #12
0
ファイル: test_ui.py プロジェクト: navap/beets
 def test_showdiff_shows_both(self):
     commands._showdiff("field", "old", "new", True)
     out = self.io.getoutput()
     self.assertTrue("old" in out)
     self.assertTrue("new" in out)
コード例 #13
0
ファイル: test_ui.py プロジェクト: navap/beets
 def test_showdiff_identical(self):
     commands._showdiff("field", "old", "old", True)
     out = self.io.getoutput()
     self.assertFalse("field" in out)
コード例 #14
0
ファイル: test_ui.py プロジェクト: mrmachine/beets
 def test_showdiff_floats_differenct(self):
     commands._showdiff("field", 1.999, 4.001)
     out = self.io.getoutput()
     self.assertTrue("field" in out)
コード例 #15
0
ファイル: test_ui.py プロジェクト: mrmachine/beets
 def test_showdiff_ints_no_color(self):
     config["color"] = False
     commands._showdiff("field", 2, 3)
     out = self.io.getoutput()
     self.assertTrue("field" in out)
コード例 #16
0
ファイル: test_ui.py プロジェクト: nidico/beets
 def test_showdiff_ints(self):
     commands._showdiff('field', 2, 3, True)
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #17
0
ファイル: test_ui.py プロジェクト: nidico/beets
 def test_showdiff_ints_no_color(self):
     commands._showdiff('field', 2, 3, False)
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #18
0
 def test_showdiff_ints_no_color(self):
     commands._showdiff('field', 2, 3, False)
     out = self.io.getoutput()
     self.assertTrue('field' in out)
コード例 #19
0
ファイル: test_ui.py プロジェクト: nidico/beets
 def test_showdiff_floats_close_to_identical(self):
     commands._showdiff('field', 1.999, 2.001, True)
     out = self.io.getoutput()
     self.assertFalse('field' in out)
コード例 #20
0
 def test_showdiff_shows_both(self):
     commands._showdiff('field', 'old', 'new', True)
     out = self.io.getoutput()
     self.assertTrue('old' in out)
     self.assertTrue('new' in out)
コード例 #21
0
 def test_showdiff_floats_close_to_identical(self):
     commands._showdiff('field', 1.999, 2.001, True)
     out = self.io.getoutput()
     self.assertFalse('field' in out)
コード例 #22
0
ファイル: test_ui.py プロジェクト: mrmachine/beets
 def test_showdiff_strings(self):
     commands._showdiff("field", "old", "new")
     out = self.io.getoutput()
     self.assertTrue("field" in out)