From d7a65ae09f4100af4efef9b769d055cc54a3597d Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Sun, 18 Mar 2012 10:09:51 +0100 Subject: [PATCH] Fixed some indent, and added some conditional compiles on pcbnew.cpp --- pcbnew/pcbnew.cpp | 4 +--- pcbnew/scripting/tests/testLoadSave.py | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 85e74642dc..e2495f19c9 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -113,8 +113,6 @@ bool EDA_APP::OnInit() wxFileName fn; PCB_EDIT_FRAME* frame = NULL; - int i=0; - #ifdef KICAD_SCRIPTING pcbnewInitPythonScripting(); #endif @@ -156,7 +154,7 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) ); frame = new PCB_EDIT_FRAME( NULL, wxT( "Pcbnew" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) ); #ifdef KICAD_SCRIPTING - ScriptingSetPcbEditFrame(frame); /* give the scripting helpers access to our frame */ + ScriptingSetPcbEditFrame(frame); /* give the scripting helpers access to our frame */ #endif frame->UpdateTitle(); diff --git a/pcbnew/scripting/tests/testLoadSave.py b/pcbnew/scripting/tests/testLoadSave.py index cabdacdef3..d8d9649a38 100644 --- a/pcbnew/scripting/tests/testLoadSave.py +++ b/pcbnew/scripting/tests/testLoadSave.py @@ -4,26 +4,26 @@ import unittest class TestLoadSave(unittest.TestCase): def setUp(self): - self.TITLE="Test Board" - self.COMMENT1="For load/save test" - self.FILENAME="/tmp/test.brd" - + self.TITLE="Test Board" + self.COMMENT1="For load/save test" + self.FILENAME="/tmp/test.brd" + def test_00_save(self): - pcb = BOARD() - pcb.GetTitleBlock().SetTitle(self.TITLE) - pcb.GetTitleBlock().SetComment1(self.COMMENT1) - result = SaveBoard(self.FILENAME,pcb) - self.assertTrue(result) + pcb = BOARD() + pcb.GetTitleBlock().SetTitle(self.TITLE) + pcb.GetTitleBlock().SetComment1(self.COMMENT1) + result = SaveBoard(self.FILENAME,pcb) + self.assertTrue(result) def test_01_load(self): pcb2 = LoadBoard(self.FILENAME) self.assertIsNotNone(pcb2) def test_02_titleblock_ok(self): - pcb2 = LoadBoard(self.FILENAME) - tb = pcb2.GetTitleBlock() - self.assertEqual(tb.GetTitle(),self.TITLE) - self.assertEqual(tb.GetComment1(),self.COMMENT1) + pcb2 = LoadBoard(self.FILENAME) + tb = pcb2.GetTitleBlock() + self.assertEqual(tb.GetTitle(),self.TITLE) + self.assertEqual(tb.GetComment1(),self.COMMENT1) if __name__ == '__main__': unittest.main() \ No newline at end of file