Your SlideShare is downloading. ×
Speccer
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Speccer

2,045
views

Published on

Speccer is a wrapper of sort for unittest module. In essence it makes writing tests a lot less painful. Check out this presentation to see a simple example of how it works. …

Speccer is a wrapper of sort for unittest module. In essence it makes writing tests a lot less painful. Check out this presentation to see a simple example of how it works.

Note that the code Speccer uses is exactly equivalent to the code shown at first! So as you can see you can write a lot by writing a little.

Published in: Technology, Sports

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,045
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Speccer Juho Vepsäläinen
  • 2. import randomimport unittestclass TestSequenceFunctions(unittest.TestCase): def setUp(self): self.seq = range(10) def test_choice(self): element = random.choice(self.seq) self.assertTrue(element in self.seq)if __name__ == __main__: unittest.main()
  • 3. import randomset up seq = range(10)chooses element in sequence random.choice(seq) in seq
  • 4. https://github.com/bebraw/speccer
  • 5. References● http://www.flickr.com/photos/ctbto/4926598654/ - nuke● http://www.flickr. com/photos/lesmontsdore/5513104816/ - python● http://www.flickr.com/photos/jeffeaton/2778624999/ - beans● http://www.flickr. com/photos/ecoagriculture/2424054385/ - sloth

×