@@ -216,15 +216,6 @@ def test_long_integers():
216
216
assert_equal (result , expected )
217
217
218
218
219
- def test_align_long_integers ():
220
- "Regression: long integers should be aligned as integers (issue #61)"
221
- table = [[_long_type (1 )], [_long_type (234 )]]
222
- result = tabulate (table , tablefmt = "plain" )
223
- expected = "\n " .join ([" 1" ,
224
- "234" ])
225
- assert_equal (result , expected )
226
-
227
-
228
219
def test_colorclass_colors ():
229
220
"Regression: ANSI colors in a unicode/str subclass (issue #49)"
230
221
try :
@@ -240,3 +231,24 @@ class textclass(_text_type):
240
231
result = tabulate ([[s ]], tablefmt = "plain" )
241
232
expected = "\x1b [35m3.14\x1b [39m"
242
233
assert_equal (result , expected )
234
+
235
+
236
+ def test_align_long_integers ():
237
+ "Regression: long integers should be aligned as integers (issue #61)"
238
+ table = [[_long_type (1 )], [_long_type (234 )]]
239
+ result = tabulate (table , tablefmt = "plain" )
240
+ expected = "\n " .join ([" 1" ,
241
+ "234" ])
242
+ assert_equal (result , expected )
243
+
244
+
245
+ def test_numpy_array_as_headers ():
246
+ "Regression: NumPy array used as headers (issue #62)"
247
+ try :
248
+ import numpy as np
249
+ headers = np .array (["foo" , "bar" ])
250
+ result = tabulate ([], headers , tablefmt = "plain" )
251
+ expected = "foo bar"
252
+ assert_equal (result , expected )
253
+ except ImportError :
254
+ raise SkipTest ()
0 commit comments