示例#1
0
    def assert_equal_any_order(self, expected):
        actual_sorted = sorted(self.stream.getvalue().splitlines(1))
        actual = "".join(actual_sorted)

        expected_sorted = sorted(expected.splitlines(1))
        expected = "".join(expected_sorted)

        assert_equals_with_unidiff(expected, actual)
示例#2
0
 def should_be(self, expected):
     from assert_equals_with_unidiff import assert_equals_with_unidiff
     assert_equals_with_unidiff(expected, self.stream.getvalue())
示例#3
0
 def should_be(self, expected):
     assert_equals_with_unidiff(expected, self.output())
示例#4
0
 def should_be(self, expected):
     assert_equals_with_unidiff(expected, self.stream.getvalue())
示例#5
0
 def user_should_read_output(self, expected_output):
     assert_equals_with_unidiff(expected_output,
                                self.user.actual_output())
示例#6
0
 def user_should_read_output_any_order(self, expected_output):
     actual_output = self.user.actual_output()
     assert_equals_with_unidiff(sort_lines(expected_output),
                                sort_lines(actual_output))