Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 14 results for
mox
- Page 1
mox create object
Programming
Software Development
12 Years Ago
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
11 Years Ago
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
11 Years Ago
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
12 Years Ago
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
12 Years Ago
by krystosan
aww man...
Reading input from a File
Programming
Software Development
10 Years Ago
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
12 Years Ago
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
13 Years Ago
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
12 Years Ago
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
11 Years Ago
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
15 Years Ago
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
10 Years Ago
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
12 Years Ago
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
12 Years Ago
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 ?
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC