mox create object Programming Software Development by krystosan … where does PersonDao comes from ? import unittest import mox class DaoUnitTest(unittest.TestCase): def setUp(self): # Create… an instance of Mox self.person_mocker = mox.Mox() def testUsingMox(self): # Create a mock PersonDao … mocking builtin os.listdir with mox Programming Software Development by krystosan …self): self._filePaths = ["/test/file/path"] self.mox = mox.Mox() def imageFilePaths(paths): imagesWithPath = [] for _path in paths: …def test_imageFilePaths(self): filePaths = self._filePaths[0] self.mox.StubOutWithMock(os,'listdir') dirContent = os.listdir(filePaths).AndReturn(['… testing with mox Programming Software Development by krystosan … that I added in the UI, so to test using mox def test_layerFilter(self): """ layer filter Knob… changed """ mx = mox.Mox() mx.StubOutWithMock(self.writeTab, '_createElementTypesFilterList') mx.StubOutWithMock(self.writeTab, '… Re: mox create object Programming Software Development by slate Look at the examples: http://code.google.com/p/pymox/wiki/MoxDocumentation#Basic_Example It is confusing to put not running code in the first chapter, I think it too. Re: mox create object Programming Software Development by krystosan aww man... Reading input from a File Programming Software Development by Fatima_110 …. eg of a file that we'd use .ab 15 mox 16 .fy 8 mixe 34 And then i have to… be: Enter filename ... lab5data.txt 00000 54.05 00002 Symbol mox does not exist 00003 10.70 00004 Symbol mixe does… Re: how to test a method that does not return anything Programming Software Development by krystosan … returns anything can we do this ? def testUsingMox(self): moxObject = mox.Mox() moxObject.StubOutWithMock(MyClass,"apply").AndReturn(None) moxObject.ReplayAll… Creating MHTML Programming Software Development by garrettb …-shadow:0 2px 4px = rgba(0,0,0,0.2);-mox-box-shadow:0 2px 4px = rgba(0,0,0,0… how to test a method that does not return anything Programming Software Development by krystosan … so how do i test above method using unittest or mox ? any help would be extremely appreciated.. Re: assertRaises test fails Programming Software Development by krystosan … = filterList.FilterList(self._filterby) self.mox = mox.Mox() def tearDown(self): self.mox.UnsetStubs() def test_stringListItems(self): self.assertRaises… self.flObj.stringListItems().AndReturn(['Boy','Bar','Home']) self.mox.ReplayAll() filteredList = self.flObj.filterList(mockLst) self… Re: Mouse Movement system Programming Software Development by doomkid …TicW.Tick Dim TicW As Boolean Dim MoX As Integer Dim MoY As Integer Dim… P As Point TicW = GetAsyncKeyState(Keys.W) MoX = MousePosition.X MoY = MousePosition.Y If TicW…P.Y = MoY - 10 P.X = MoX SetCursorPos(P) End If End Sub End Class[/CODE… Re: Reading input from a File Programming Software Development by Fatima_110 Never mind, i found the answer somewhere else. i had to have the reading of symbol and quantity at the top of my loop. so my loop would be: while (fileInput.hasNext()) { String symbol = fileInput.next(); int quantity = fileInput.nextInt(); Stock myStock = new Stock(symbol); double … Re: how to test a method that does not return anything Programming Software Development by Lucaci Andrew Presumably `_getScript()` returns an object if all went well, or a `none` object otherwise. You could test if your `script` variable is `none`, provided that your `_getScript()` function supports returning `none` values. Was this your question, or did I interpret it wrong? Re: how to test a method that does not return anything Programming Software Development by krystosan yes _getScripts returns None resulting an error , since by default it is supposed to return the path of the script... but then again how would u test using assert ?