16 lines
316 B
Python
16 lines
316 B
Python
from src.codewars.kata_thinkful_quarks import Quark
|
|
|
|
|
|
def test_quark():
|
|
q1 = Quark("red", "up")
|
|
q2 = Quark("blue", "strange")
|
|
|
|
assert q1.color == "red"
|
|
assert q2.flavor == "strange"
|
|
assert q2.baryon_number == 1 / 3
|
|
|
|
q1.interact(q2)
|
|
|
|
assert q1.color == "blue"
|
|
assert q2.color == "red"
|