Skip to content

Commit

Permalink
tests: replaced module imports to the top (OSGeo#4656)
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit authored Nov 20, 2024
1 parent 7202748 commit 36359e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ per-file-ignores =
python/grass/temporal/temporal_granularity.py: E722
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
python/grass/pygrass/tests/benchmark.py: E402, F821
python/grass/pygrass/tests/benchmark.py: F821
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
# Files not managed by Black
python/grass/imaging/images2gif.py: E226
# Unused imports in init files
# F403 star import used; unable to detect undefined names
python/grass/temporal/__init__.py: F401, F403
Expand Down
5 changes: 5 additions & 0 deletions python/grass/pygrass/tests/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@
from jinja2 import Template
from pathlib import Path


sys.path.append(str(Path.cwd()))
sys.path.append("%s/.." % (str(Path.cwd())))


# flake8: noqa: E402
import grass.lib.gis as libgis
import grass.lib.raster as libraster
import grass.script as gs
import ctypes

# flake8: qa


def test__RasterSegment_value_access__if():
test_a = pygrass.RasterSegment(name="test_a")
Expand Down

0 comments on commit 36359e2

Please sign in to comment.