Closed oscargus closed 1 year ago
This pull request introduces 1 alert when merging ea15d983b0aa63da7167885ca72c8805ac3f9b34 into dc999b2fc56b71e10608470db3998db39ed40aa3 - view on LGTM.com
new alerts:
This is the error I get:
ascii_file = 'C:\\Users\\Oscar\\numpy-stl\\tests\\stl_ascii\\HalfDonut.stl', tmpdir = local('C:\\Users\\Oscar\\numpy-stl\\tests\\tmp\\test_args_False_0')
def test_args(ascii_file, tmpdir):
parser = main._get_parser('')
def _get_name(*args):
return main._get_name(parser.parse_args(list(map(str, args))))
assert _get_name('--name', 'foobar') == 'foobar'
assert _get_name('-', tmpdir.join('binary.stl')).endswith('binary.stl')
> assert _get_name(ascii_file, '-').endswith('HalfDonut.stl')
E AssertionError: assert False
E + where False = <built-in method endswith of str object at 0x0000029B4DBC7B10>('HalfDonut.stl')
E + where <built-in method endswith of str object at 0x0000029B4DBC7B10> = 'C:\\Users\\Oscar\\AppData\\Local\\Temp\\tmp55rp248i'.endswith
E + where 'C:\\Users\\Oscar\\AppData\\Local\\Temp\\tmp55rp248i' = <function test_args.<locals>._get_name at 0x0000029B53EFADC0>('C:\\Users\\Oscar\\numpy-stl\\tests\\stl_ascii\\HalfDonut.stl', '-')
I assume that 'C:\\Users\\Oscar\\AppData\\Local\\Temp\\tmp55rp248i'
used to give some string starting with <
in another versions?
(The same thing happens on the develop-branch so nothing in this PR causes it.)
Sorry for the very slow response... this one completely slipped by me.
With regards to the broken test, I'm guessing it's a windows specific issue. Apparently it's creating a temporary file here.
In any case, the changes look great :) I'm updating a few other things as well and I'll create a new release
Thank you for all the help!
Six things (in the order I did them, one lead to another, sort of):
str
of temporary directory(?).~One should possibly also remove all instances of the
s
function, but not done.~