Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Commit abb792f

Browse files
committed
fix(TCs): flake complained about import * (F405)
1 parent 05f87a9 commit abb792f

File tree

11 files changed

+35
-25
lines changed

11 files changed

+35
-25
lines changed

test/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from pycallgraph import PyCallGraph, Config
12
import tempfile
23

3-
from helpers import *
4+
import pytest
45

56

67
@pytest.fixture(scope='module')

test/helpers.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
# flake8: noqa
22
import time
33

4-
import pytest
5-
6-
import fix_path
7-
from pycallgraph import *
8-
from pycallgraph.tracer import *
9-
from pycallgraph.output import *
10-
114

125
def wait_100ms():
136
time.sleep(0.1)

test/test_color.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from helpers import *
1+
from pycallgraph import ColorException, Color
2+
3+
import pytest
24

35

46
def test_bad_range():

test/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from helpers import *
1+
from pycallgraph.config import Config
22

33

44
def test_init():

test/test_gephi.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
from helpers import *
2-
from calls import *
1+
from pycallgraph import PyCallGraph
2+
from pycallgraph.output.gephi import GephiOutput
3+
import os
4+
5+
import pytest
6+
7+
from calls import one_nop
38

49

510
@pytest.fixture

test/test_graphviz.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
from helpers import *
2-
from calls import *
1+
from pycallgraph.output.graphviz import GraphvizOutput
2+
from pycallgraph.pycallgraph import PyCallGraph
3+
import os
4+
5+
import pytest
6+
7+
from calls import one_nop
38

49

510
@pytest.fixture

test/test_output.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from helpers import *
1+
from pycallgraph import Config
2+
from pycallgraph.output import Output
23

34

45
def test_set_config():

test/test_pycallgraph.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from helpers import *
1+
from pycallgraph.exceptions import PyCallGraphException
2+
from pycallgraph.tracer import AsyncronousTracer, SyncronousTracer
3+
4+
import pytest
25

36

47
def test_start_no_outputs(pycg):

test/test_script.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import subprocess
22

3-
from helpers import *
4-
53

64
def execute(arguments):
75
command = 'PYTHONPATH=. scripts/pycallgraph ' + arguments

test/test_trace_processor.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
from pycallgraph.tracer import TraceProcessor
12
import re
23
import sys
34

4-
from helpers import *
5-
import calls
6-
from pycallgraph.tracer import TraceProcessor
5+
import pytest
6+
7+
from pycallgraph import Config
8+
from calls import one_nop, nop
79

810

911
@pytest.fixture
@@ -20,7 +22,7 @@ def test_empty(trace_processor):
2022

2123
def test_nop(trace_processor):
2224
sys.settrace(trace_processor.process)
23-
calls.nop()
25+
nop()
2426
sys.settrace(None)
2527

2628
assert trace_processor.call_dict == {
@@ -32,7 +34,7 @@ def test_nop(trace_processor):
3234

3335
def test_one_nop(trace_processor):
3436
sys.settrace(trace_processor.process)
35-
calls.one_nop()
37+
one_nop()
3638
sys.settrace(None)
3739

3840
assert trace_processor.call_dict == {
@@ -45,7 +47,7 @@ def stdlib_trace(trace_processor, include_stdlib):
4547
trace_processor.config = Config(include_stdlib=include_stdlib)
4648
sys.settrace(trace_processor.process)
4749
re.match("asdf", "asdf")
48-
calls.one_nop()
50+
one_nop()
4951
sys.settrace(None)
5052
return trace_processor.call_dict
5153

0 commit comments

Comments
 (0)