def test_parses_port_and_path(self): self.assertEqual(url_from_arguments([8000, "/foo"]), "http://localhost:8000/foo")
def test_fails_on_backwards_arguments(self): self.assertRaises(StandardError, lambda: url_from_arguments(["/", 8000]))
def test_fails_on_single_argument(self): self.assertRaises(IndexError, lambda: url_from_arguments([8000]))
def test_fails_on_non_numeric_port(self): self.assertRaises(ValueError, lambda: url_from_arguments(["foo", "/"]))