Cannot run individual test when genty_dataset contains colon
- Dominant language
- Python
- Stars
- 120
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have this genty dataset:
`
_IP_UNMATCHED_DATA = (
('2001:6:0:0:0:0:0:0'),
('2001:5:0:0:0:0:0:0')
)`
and this test code:
` @genty_dataset(*_IP_UNMATCHED_DATA)
def test_ipv6(self, ip):
assert ip == ip, "Wrong"`
When I try to run "test_ipv6" test method with a single input using nose I'm getting the following error:
nosetests regression/test_a.py:TestA.test_ipv6\\('2001:6:0:0:0:0:0:0'\\)
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 11, in
sys.exit(run_exit())
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 121, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 179, in parseArgs
self.createTests()
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 193, in createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames)
File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 481, in loadTestsFromNames
return unittest.TestLoader.loadTestsFromNames(self, names, module)
File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 378, in loadTestsFromName
addr = TestAddress(name, workingDir=self.workingDir)
File "/usr/local/lib/python2.7/dist-packages/nose/selector.py", line 226, in __init__
self.filename, self.module, self.call = split_test_name(name)
File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 375, in split_test_name
file_part, fn = tail.split(':')
ValueError: too many values to unpack
Do you know what can I do?
Thanks!
Contributor guide
Research direction
Reproduce the failure with the nosetests command shown for regression/test_a.py::TestA.test_ipv6 and the genty_dataset input containing colons. Start with the test-name parsing path shown in nose's traceback and the generated test name; done means an individual IPv6 dataset case can be selected without ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100