Skip to content

Commit

Permalink
improve: test
Browse files Browse the repository at this point in the history
  • Loading branch information
szsdk committed Mar 10, 2024
1 parent c4805e0 commit c40ffd6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions emcfile/_pattern_sone.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,7 @@ def check_indices_ordered(self) -> bool:
return False
a = np.subtract(self.place_ones[1:], self.place_ones[:-1], dtype=int)
a[self.ones_idx[1:-1] - 1] = 1
if np.any(a <= 0):
return False
return True
return not np.any(a <= 0)

def ensure_indices_ordered(self) -> None:
if self.check_indices_ordered():
Expand Down
2 changes: 1 addition & 1 deletion emcfile/tests/test_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_write_patterns(suffix, data_list):
logging.info(f"speed[single]: {all_data.nbytes * 1e-9 /t1:.2f} GB/s")

t = time.time()
ef.write_patterns(data_list, f0.name, overwrite=True)
ef.write_patterns(data_list, f0.name, buffer_size=2**12, overwrite=True)
t0 = time.time() - t
logging.info(
"speed[multiple; #patterns=%d]: %.2f GB/s",
Expand Down

0 comments on commit c40ffd6

Please sign in to comment.