Adapted two tests to the new details
- New pcbnew import in gs.py - New return value for _get_columns()
This commit is contained in:
parent
d3ad786dd5
commit
ccbb8a6060
|
|
@ -4,7 +4,12 @@
|
||||||
# License: GPL-3.0
|
# License: GPL-3.0
|
||||||
# Project: KiBot (formerly KiPlot)
|
# Project: KiBot (formerly KiPlot)
|
||||||
import os
|
import os
|
||||||
import pcbnew
|
try:
|
||||||
|
import pcbnew
|
||||||
|
except ImportError:
|
||||||
|
# This is catched by __main__, ignore the error here
|
||||||
|
class pcbnew(object):
|
||||||
|
pass
|
||||||
from datetime import datetime, date
|
from datetime import datetime, date
|
||||||
from sys import exit
|
from sys import exit
|
||||||
from .misc import EXIT_BAD_ARGS, W_DATEFORMAT, KICAD_VERSION_5_99
|
from .misc import EXIT_BAD_ARGS, W_DATEFORMAT, KICAD_VERSION_5_99
|
||||||
|
|
@ -78,6 +83,7 @@ class GS(object):
|
||||||
global_output = None
|
global_output = None
|
||||||
global_dir = None
|
global_dir = None
|
||||||
global_variant = None
|
global_variant = None
|
||||||
|
global_units = None
|
||||||
solved_global_variant = None
|
solved_global_variant = None
|
||||||
global_kiauto_wait_start = None
|
global_kiauto_wait_start = None
|
||||||
global_kiauto_time_out_scale = None
|
global_kiauto_time_out_scale = None
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ def test_bom_no_sch():
|
||||||
# Create an ibom object
|
# Create an ibom object
|
||||||
GS.sch = None
|
GS.sch = None
|
||||||
out = RegOutput.get_class_for('bom')()
|
out = RegOutput.get_class_for('bom')()
|
||||||
columns = out.options._get_columns()
|
(columns, extra) = out.options._get_columns()
|
||||||
assert columns == ColumnList.COLUMNS_DEFAULT
|
assert columns == ColumnList.COLUMNS_DEFAULT
|
||||||
out = RegOutput.get_class_for('kibom')()
|
out = RegOutput.get_class_for('kibom')()
|
||||||
options = out.options()
|
options = out.options()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue