From 9fd0009c04252d3140109b8b8a2112e353883647 Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Wed, 4 Jan 2012 14:33:53 -0800 Subject: [PATCH] Revert "ninja_syntax.py: Fix a bug when passing variables to Writer.build()" This reverts commit 95ab954. The test was verifying the wrong behavior. I reviewed too quickly. :( --- misc/ninja_syntax.py | 2 +- misc/ninja_test.py | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py index 8f3e309..b73a002 100644 --- a/misc/ninja_syntax.py +++ b/misc/ninja_syntax.py @@ -66,7 +66,7 @@ class Writer(object): ' '.join(all_inputs))) if variables: - for key, val in variables.iteritems(): + for key, val in variables: self.variable(key, val, indent=1) return outputs diff --git a/misc/ninja_test.py b/misc/ninja_test.py index 7059ae7..65dbec6 100755 --- a/misc/ninja_test.py +++ b/misc/ninja_test.py @@ -111,18 +111,5 @@ foo = a$$ $ ''', self.out.getvalue()) -class TestBuild(unittest.TestCase): - def setUp(self): - self.out = StringIO() - self.n = ninja_syntax.Writer(self.out) - - def test_variables(self): - self.n.build('out', 'cc', 'in', variables={'name': 'value'}) - self.assertEqual('''\ -build out: cc in - name = value -''', - self.out.getvalue()) - if __name__ == '__main__': unittest.main() -- 2.7.4