Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This finally ends the long and painful story of trying to maintain two versions of PyEphem, one for Python 2 and the other for Python 3. Thanks to the experience that other projects have given me in the last few years about writing 2+3 compatible code, plus a dozen or so daring C language #if...#else...#fi calls, I am now back to one code base only. Conflicts: .gitignore INSTALL MANIFEST.in README.rst extensions/_libastro.c libastro-3.7.5/dbfmt.c libastro-3.7.5/formats.c libastro-3.7.5/misc.c setup.py src/ephem/__init__.py src/ephem/doc/CHANGELOG.rst src/ephem/doc/angle.rst src/ephem/doc/coordinates.rst src/ephem/doc/date.rst src/ephem/doc/examples.rst src/ephem/doc/index.rst src/ephem/doc/newton.rst src/ephem/doc/quick.rst src/ephem/doc/radec.rst src/ephem/doc/tutorial.rst src/ephem/tests/test_angles.py src/ephem/tests/test_bodies.py src/ephem/tests/test_dates.py src/ephem/tests/test_jpl.py src/ephem/tests/test_rst.py src/ephem/tests/test_satellite.py src/ephem/tests/test_usno.py
- Loading branch information
Showing
6 changed files
with
53 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python | ||
|
||
import unittest | ||
import ephem | ||
import locale | ||
|
||
# Determine whether we can convert values regardless of locale. | ||
|
||
class locales_suite(unittest.TestCase): | ||
def setUp(self): | ||
self.old_locale = locale.getlocale(locale.LC_NUMERIC) | ||
locale.setlocale(locale.LC_NUMERIC, 'de_CH.UTF-8') | ||
|
||
def tearDown(self): | ||
locale.setlocale(locale.LC_NUMERIC, self.old_locale) | ||
|
||
def test_date_creation(self): | ||
self.assertEqual(ephem.date('2008.5'), 39629.5) # instead of 2008.0 | ||
|
||
def test_satellite_creation(self): | ||
s = ephem.readtle('ISS (ZARYA)', | ||
'1 25544U 98067A 08334.54218750 .00025860 ' | ||
'00000-0 20055-3 0 7556', | ||
'2 25544 051.6425 248.8374 0006898 046.3246 ' | ||
'303.9711 15.71618375574540594') | ||
self.assertEqual(str(s._raan), '248:50:14.6') # instead of :00:00.0 | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |