mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-02 12:01:17 +00:00
1ffc273c94
- Move more stuff that belongs in netlib.human - Move some stuff to near the only use - Zap mitmproxy.utils.timestamp(). I see the rationale, but we used it interchangeably with time.time() throughout the project. Since time.time() dominates in the codebase and timestamp() is such low utility, away it goes.
16 lines
262 B
Python
16 lines
262 B
Python
from pathod import utils
|
|
import tutils
|
|
|
|
|
|
def test_membool():
|
|
m = utils.MemBool()
|
|
assert not m.v
|
|
assert m(1)
|
|
assert m.v == 1
|
|
assert m(2)
|
|
assert m.v == 2
|
|
|
|
|
|
def test_data_path():
|
|
tutils.raises(ValueError, utils.data.path, "nonexistent")
|