diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-09-30 23:42:02 -0400 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-09-30 23:42:02 -0400 |
commit | f8449ad2b60b8a715d0867325e257a8297193b49 (patch) | |
tree | c7cf4bed6de5c6200f9aaf937167ee71d1c9ce58 /gerber/tests/test_cnc.py | |
parent | 88fb7f23110d2270c5c7f8a7b90cae32295da78e (diff) | |
download | gerbonara-f8449ad2b60b8a715d0867325e257a8297193b49.tar.gz gerbonara-f8449ad2b60b8a715d0867325e257a8297193b49.tar.bz2 gerbonara-f8449ad2b60b8a715d0867325e257a8297193b49.zip |
tests update
Diffstat (limited to 'gerber/tests/test_cnc.py')
-rw-r--r-- | gerber/tests/test_cnc.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gerber/tests/test_cnc.py b/gerber/tests/test_cnc.py new file mode 100644 index 0000000..ace047e --- /dev/null +++ b/gerber/tests/test_cnc.py @@ -0,0 +1,50 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +# Author: Hamilton Kibbe <ham@hamiltonkib.be> + +from ..cnc import CncFile, FileSettings +from tests import * + + +def test_smoke_filesettings(): + """ Smoke test FileSettings class + """ + fs = FileSettings() + + +def test_filesettings_defaults(): + """ Test FileSettings default values + """ + fs = FileSettings() + assert_equal(fs.format, (2, 5)) + assert_equal(fs.notation, 'absolute') + assert_equal(fs.zero_suppression, 'trailing') + assert_equal(fs.units, 'inch') + + +def test_filesettings_dict(): + """ Test FileSettings Dict + """ + fs = FileSettings() + assert_equal(fs['format'], (2, 5)) + assert_equal(fs['notation'], 'absolute') + assert_equal(fs['zero_suppression'], 'trailing') + assert_equal(fs['units'], 'inch') + + +def test_filesettings_assign(): + """ Test FileSettings attribute assignment + """ + fs = FileSettings() + fs.units = 'test' + fs.notation = 'test' + fs.zero_suppression = 'test' + fs.format = 'test' + assert_equal(fs.units, 'test') + assert_equal(fs.notation, 'test') + assert_equal(fs.zero_suppression, 'test') + assert_equal(fs.format, 'test') + + def test_smoke_cncfile(): + pass |