-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82e098e
commit ff9ed47
Showing
1 changed file
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding=utf-8 | ||
"""Tests XY to OSGB functionality. | ||
.. note:: This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
""" | ||
__author__ = '[email protected]' | ||
__date__ = '15/01/2018' | ||
__copyright__ = ('Copyright 2018, Tom Chadwin') | ||
|
||
import os | ||
import unittest | ||
|
||
from utilities import get_qgis_app | ||
|
||
from xy_to_osgb import xy_to_osgb | ||
QGIS_APP = get_qgis_app() | ||
|
||
|
||
class QGISTest(unittest.TestCase): | ||
"""Test the QGIS Environment""" | ||
|
||
def test_xy_to_osgb(self): | ||
"""Given XY returns correct OSGB coordinates""" | ||
|
||
osgb_gridref = xy_to_osgb(393618.933445, 564351.935939) | ||
expected = "NY9364" | ||
self.assertEqual(osgb_gridref, expected) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |