From 3bf61bb311e5832f1d001b1ecc2f82c23bc57f15 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sat, 31 Mar 2018 12:51:42 +0100 Subject: [PATCH] tests: Clarify which minimize_source samples are the reference --- tests/minimize_source_test.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/tests/minimize_source_test.py b/tests/minimize_source_test.py index 3feb5468..857fc339 100644 --- a/tests/minimize_source_test.py +++ b/tests/minimize_source_test.py @@ -16,29 +16,38 @@ def read_sample(fname): class MinimizeSource(unittest2.TestCase): def test_class(self): original = read_sample('class.py') - minimized = read_sample('class_min.py') - self.assertEquals(minimized, minimize_source(original)) + expected = read_sample('class_min.py') + self.assertEqual(expected, minimize_source(original)) + def test_comment(self): + original = read_sample('comment.py') + expected = read_sample('comment_min.py') + self.assertEqual(expected, minimize_source(original)) def test_def(self): original = read_sample('def.py') - minimized = read_sample('def_min.py') - self.assertEquals(minimized, minimize_source(original)) + expected = read_sample('def_min.py') + self.assertEqual(expected, minimize_source(original)) def test_hashbang(self): original = read_sample('hashbang.py') - minimized = read_sample('hashbang_min.py') - self.assertEquals(minimized, minimize_source(original)) + expected = read_sample('hashbang_min.py') + self.assertEqual(expected, minimize_source(original)) def test_mod(self): original = read_sample('mod.py') - minimized = read_sample('mod_min.py') - self.assertEquals(minimized, minimize_source(original)) + expected = read_sample('mod_min.py') + self.assertEqual(expected, minimize_source(original)) + + def test_pass(self): + original = read_sample('pass.py') + expected = read_sample('pass_min.py') + self.assertEqual(expected, minimize_source(original)) def test_obstacle_course(self): original = read_sample('obstacle_course.py') - minimized = read_sample('obstacle_course_min.py') - self.assertEquals(minimized, minimize_source(original)) + expected = read_sample('obstacle_course_min.py') + self.assertEqual(expected, minimize_source(original)) if __name__ == '__main__':