miketeo / pymutester Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
@miketeo Is the below error a usage issue or an existing bug?
Ran 483 tests in 39.871s
OK
Starting mutation test...
Traceback (most recent call last):
File "C:/Python27/Scripts/mutant-nosetests", line 4, in
import('pkg_resources').run_script('pymutester==0.1.1', 'mutant-nosetests')
File "C:\Python27\lib\site-packages\pkg_resources_init_.py", line 742, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "C:\Python27\lib\site-packages\pkg_resources_init_.py", line 1497, in run_script
exec(code, namespace, namespace)
File "c:\python27\lib\site-packages\pymutester-0.1.1-py2.7.egg\EGG-INFO\scripts\mutant-nosetests", line 7, in
main()
File "C:\Python27\lib\site-packages\pymutester-0.1.1-py2.7.egg\mutester\nose_main.py", line 52, in main
source_function_names[source_filename] = generate_function_names(source_filename)
File "C:\Python27\lib\site-packages\pymutester-0.1.1-py2.7.egg\mutester\util.py", line 54, in generate_function_names
with open(source_filename, 'rU') as fh:
IOError: [Errno 22] invalid mode ('rU') or filename: ''
I just tried to run pymutester's own unit tests. Not good:
$ nosetests ....F ====================================================================== FAIL: test_cfgparser (tests.test_nosemain.NoseMainTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/src/PyMuTester/tests/test_nosemain.py", line 43, in test_cfgparser assert not diff_lines, 'Test output is different\n\n' + ''.join(diff_lines) AssertionError: Test output is different --- Expected Output +++ Test Output @@ -1,130 +0,0 @@ -Starting mutation test... -************************* -Mutating ParsingError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:206)... -Mutating NoOptionError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:161)... -Mutating ParsingError.append (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:211)... -Mutating RawConfigParser.has_option (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:373)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -Mutating DuplicateSectionError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:154)... -Mutating InterpolationDepthError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:195)... -Mutating RawConfigParser.readfp (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:307)... -*** IFNOT-1... Mutant killed -Mutating RawConfigParser._read (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:462)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -*** IFNOT-3... Mutant killed -*** IFNOT-4... Mutant killed -*** IFNOT-5... Mutant killed -*** IFNOT-6... Mutant killed -*** IFNOT-7... Mutant killed -*** IFNOT-8... Mutant killed -*** IFNOT-9... Mutant killed -*** IFNOT-10... Mutant killed -*** IFNOT-11... Mutant killed -*** IFNOT-12... Mutant killed -*** IFNOT-13... Mutant killed -*** IFNOT-14... Mutant killed -*** IFNOT-15... Mutant killed -*** IFNOT-16... Mutant killed -*** SKIPLOOP-1... Mutant killed -Mutating RawConfigParser.add_section (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:250)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -Mutating RawConfigParser.read (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:282)... -*** IFNOT-1... Mutant killed -*** SKIPLOOP-1... Mutant killed -Mutating RawConfigParser.set (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:385)... -*** IFNOT-1... Mutant killed -Mutating NoSectionError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:147)... -Mutating RawConfigParser.remove_option (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:414)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -Mutating InterpolationError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:170)... -Mutating RawConfigParser.sections (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:245)... -Mutating RawConfigParser.has_section (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:264)... -Mutating Error._set_message (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:125)... -Mutating SafeConfigParser._interpolate_some (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:649)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -*** IFNOT-3... Mutant killed -*** IFNOT-4... Mutant killed -*** IFNOT-5... Mutant killed -*** IFNOT-6... Mutant killed -*** IFNOT-7... Mutant killed -*** SKIPLOOP-1... Mutant killed -Mutating RawConfigParser.optionxform (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:370)... -Mutating MissingSectionHeaderError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:218)... -Mutating RawConfigParser.write (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:396)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -*** IFNOT-3... Mutant killed -*** SKIPLOOP-1... Mutant killed -*** SKIPLOOP-2... Mutant killed -*** SKIPLOOP-3... Mutant killed -Mutating RawConfigParser.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:229)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -*** SKIPLOOP-1... Mutant killed -Mutating RawConfigParser.options (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:271)... -*** IFNOT-1... Mutant killed -Mutating InterpolationMissingOptionError.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:178)... -Mutating Error.__init__ (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:135)... -Mutating RawConfigParser.getboolean (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:364)... -*** IFNOT-1... Mutant killed -Mutating Error._get_message (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:120)... -Mutating ConfigParser.items (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:578)... -*** IFNOT-1... Mutant not reached ---- /home/pip/PyMuTester/tests/mock_modules/ConfigParser.py (original) -+++ /home/pip/PyMuTester/tests/mock_modules/ConfigParser.py (mutant-IFNOT-1) -@@ -591,7 +591,8 @@ - try: - d.update(self._sections[section]) - except KeyError: -- if section != DEFAULTSECT: -+ if (not (section != DEFAULTSECT)): - raise NoSectionError(section) - # Update with the entry specific variables - if vars: -*** IFNOT-2... Mutant killed -*** IFNOT-3... Mutant killed -*** IFNOT-4... Mutant killed -*** SKIPLOOP-1... Mutant not reached ---- /home/pip/PyMuTester/tests/mock_modules/ConfigParser.py (original) -+++ /home/pip/PyMuTester/tests/mock_modules/ConfigParser.py (mutant-SKIPLOOP-1) -@@ -595,7 +595,9 @@ - raise NoSectionError(section) - # Update with the entry specific variables - if vars: -- for key, value in vars.items(): -+ for (key, value) in vars.items(): -+ if mutest_statement_reached() % 2 == 0: continue - d[self.optionxform(key)] = value - options = d.keys() - if "__name__" in options: -Mutating SafeConfigParser.set (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:687)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -*** IFNOT-3... Mutant killed -Mutating ConfigParser.get (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:546)... -*** IFNOT-1... Mutant killed -*** IFNOT-2... Mutant killed -*** IFNOT-3... Mutant killed -*** SKIPLOOP-1... Mutant not reached ---- /home/pip/PyMuTester/tests/mock_modules/ConfigParser.py (original) -+++ /home/pip/PyMuTester/tests/mock_modules/ConfigParser.py (mutant-SKIPLOOP-1) -@@ -562,7 +562,9 @@ - raise NoSectionError(section) - # Update with the entry specific variables - if vars: -- for key, value in vars.items(): -+ for (key, value) in vars.items(): -+ if mutest_statement_reached() % 2 == 0: continue - d[self.optionxform(key)] = value - option = self.optionxform(option) - try: -Mutating SafeConfigParser._interpolate (/home/pip/PyMuTester/tests/mock_modules/ConfigParser.py:641)... - -Mutant Test Results -Total: 58 - Alive: 0 (0.0%) Killed: 55 (94.8%) Unreachable: 3 (5.2%) ---------------------------------------------------------------------- Ran 5 tests in 0.215s FAILED (failures=1)
This is Python 2.7.6 on Ubuntu 14.04.
I just tried mutester for the first time. It crashed right out of the gate:
$ PYTHONPATH=lib mutant-nosetests --mutant-path $PWD/lib -w tests ........... ---------------------------------------------------------------------- Ran 11 tests in 1.455s OK ************************* Starting mutation test... ************************* Traceback (most recent call last): File "/var/lib/venv/renesys/bin/mutant-nosetests", line 7, in main() File "/var/lib/venv/renesys/local/lib/python2.7/site-packages/mutester/nose_main.py", line 36, in main for module_name, module in sys.modules.iteritems(): RuntimeError: dictionary changed size during iteration
I just installed pymutester with pip3 install pymutester
. This worked (seemingly), but gave an error:
$ pip3 install pymutester
Downloading/unpacking pymutester
Downloading pymutester-0.1.0.tar.gz
Running setup.py (path:/private/var/folders/rz/zjrxrqhd3952q45ssdzms0_40000gn/T/pip_build_ferriera/pymutester/setup.py) egg_info for package pymutester
Requirement already satisfied (use --upgrade to upgrade): nose>=0.11.4 in /usr/local/lib/python3.4/site-packages (from pymutester)
Installing collected packages: pymutester
Running setup.py install for pymutester
changing mode of build/scripts-3.4/mutant-nosetests from 600 to 755
File "/usr/local/lib/python3.4/site-packages/mutester/importer.py", line 28
exec self.override_code in mod.__dict__
^
SyntaxError: Missing parentheses in call to 'exec'
changing mode of /usr/local/bin/mutant-nosetests to 755
Successfully installed pymutester
Cleaning up...
When I try to execute mutant-nosetests
, I get the same error.
Perhaps pymutester doesn't support Python 3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.