Skip to content

Commit

Permalink
Fixed bug where pony stripped spaces from mutant IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
boxed committed Nov 12, 2018
1 parent c28b1e5 commit 63089e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions mutmut/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@


class SourceFile(db.Entity):
filename = Required(str)
filename = Required(text_type, autostrip=False)
lines = Set('Line')


class Line(db.Entity):
sourcefile = Required(SourceFile)
line = Required(text_type)
line = Required(text_type, autostrip=False)
mutants = Set('Mutant')


class Mutant(db.Entity):
line = Required(Line)
index = Required(int)
tested_against_hash = Optional(text_type)
status = Required(text_type) # really an enum of mutant_statuses
tested_against_hash = Optional(text_type, autostrip=False)
status = Required(text_type, autostrip=False) # really an enum of mutant_statuses


def init_db(f):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

file_to_mutate_lines = [
"def foo(a, b):",
" return a < b",
" return a < b",
"e = 1",
"f = 3",
"d = dict(e=f)",
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_full_run_one_surviving_mutant():
Suspicious 🤔
Survived 🙁
mutmut foo.py --apply --mutation "return a < b⤑0"
mutmut foo.py --apply --mutation " return a < b⤑0"
""".strip()


Expand Down

0 comments on commit 63089e9

Please sign in to comment.