Re: [Tutor] Tutor Digest, Vol 160, Issue 26

2017-06-20 Thread angela ebirim
Hi, I'm trying to dynamically build a url in python and have tried using: #file.py import json import requests from urllib.parse import urljoin baseUrl = " http://data.parliament.uk/membersdataplatform/services/mnis/members/query"; search_criteria = "House=Commons" outputs = "Constituencies" h

[Tutor] Puzzling case of assertRaises not running properly

2016-12-30 Thread angela ebirim
Hi, Learning about how to write tests in Python and have a query. *#bill.py* class Bill(object): def tax(self, total): tax = float(total * 0.05) return round(tax, 2) def check_input(self, seat1, app1): try: seat1 = float(seat1) app1 = float(app1) except

[Tutor] TDD in Python

2016-09-26 Thread angela ebirim
Hello everyone, I'm a new member on this maling list and am in the process of learning python. I'm keen to learn about testing my Python code and hoping someone could help me with this query... #test.py class Test: def __init__(self, members): self.members = members def printMe