Skip to content

Commit 40b3312

Browse files
committed
Rename pyevil
1 parent 4804b41 commit 40b3312

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# bastardize
1+
# Pyevil
22

33
`400 + 400 != 800`, `2.0 * 2 == 3`, and other assorted evil...
44

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33

44
setup(
5-
name='bastardize',
6-
ext_modules=[ Extension('bastardize', sources=[ 'src/bastardize.c' ]) ]
5+
name='pyevil',
6+
ext_modules=[Extension('pyevil', sources=['src/pyevil.c'])]
77
)

src/bastardize.c renamed to src/pyevil.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ struct PyMethodDef methods[] = {
136136

137137
struct PyModuleDef module = {
138138
.m_base = PyModuleDef_HEAD_INIT,
139-
.m_name = "bastardize",
139+
.m_name = "pyevil",
140140
.m_doc = "",
141141
.m_size = 0,
142142
.m_methods = methods,
143143
};
144144

145-
PyMODINIT_FUNC PyInit_bastardize(void) {
145+
PyMODINIT_FUNC PyInit_pyevil(void) {
146146
return PyModule_Create(&module);
147147
};

test_bastardize.py renamed to test_pyevil.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import bastardize
1+
import pyevil
22

33

44
def test_int_copy():
55
"""
66
If you're mutating ints, you might want copies...
77
"""
8-
newone = bastardize.int_copy(1)
8+
newone = pyevil.int_copy(1)
99
assert newone == 1
1010
assert not (newone is 1)
1111

@@ -15,15 +15,15 @@ def test_int_copy_neg():
1515
Because Python has a weird representation for negative ints,
1616
test this, too...
1717
"""
18-
someneg = bastardize.int_copy(-10)
18+
someneg = pyevil.int_copy(-10)
1919
assert someneg == -10
2020
assert not (someneg is -10)
2121

2222

2323
def test_int_mutate():
24-
one = bastardize.int_copy(1)
24+
one = pyevil.int_copy(1)
2525
assert one == 1
26-
bastardize.int_mutate(one, 2)
26+
pyevil.int_mutate(one, 2)
2727
assert one != 1
2828
assert one == 2
2929
assert one + one == 4
@@ -36,7 +36,7 @@ def test_evil_int_mutate():
3636
(If you're bold, try changing the value of 1 and see how many libraries you can break.)
3737
"""
3838
assert 800 != 900
39-
bastardize.int_mutate(800, 900, force=True)
39+
pyevil.int_mutate(800, 900, force=True)
4040
assert 800 == 900
4141
assert 400 + 400 != 800 # *evil laugh*
4242

@@ -45,17 +45,17 @@ def test_float_mutate():
4545
"""
4646
Let's mess with floats, too.
4747
"""
48-
bastardize.float_mutate(2.0, 1.5)
48+
pyevil.float_mutate(2.0, 1.5)
4949
assert 2.0 * 2 == 3
5050

5151

5252
def test_float_mutate_copy():
5353
"""
5454
We can use copies, too...
5555
"""
56-
three = bastardize.float_copy(3.0)
56+
three = pyevil.float_copy(3.0)
5757
still_three = three
58-
bastardize.float_mutate(three, 4.0)
58+
pyevil.float_mutate(three, 4.0)
5959
# We've taken a float object and changed its value.
6060
# This is different from reassigning to a new object,
6161
# On the surface, it looks kind of the same as `three = 4.0`
@@ -71,5 +71,5 @@ def test_tuple_set_item():
7171
data[0] = 4 # Gives TypeError: 'tuple' object does not support item assignment
7272
"""
7373
data = (1,2,3)
74-
bastardize.tuple_set_item(data, index=0, value=4)
74+
pyevil.tuple_set_item(data, index=0, value=4)
7575
assert data == (4,2,3)

0 commit comments

Comments
 (0)