File: test_cities.py

package info (click to toggle)
pyephem 4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,380 kB
  • sloc: ansic: 77,574; python: 2,529; makefile: 74
file content (12 lines) | stat: -rw-r--r-- 284 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python

import unittest
from ephem import city

class CityTests(unittest.TestCase):
    def test_boston(self):
        b = city('Boston')
        self.assertEqual(b.name, 'Boston')

    def test_unknown_city(self):
        self.assertRaises(KeyError, city, 'Marietta')