Skip to content

Commit 61eda76

Browse files
authored
Merge pull request kohya-ss#2108 from rockerBOO/syntax-test
Add tests for syntax checking training scripts
2 parents 5753b8f + e4d6923 commit 61eda76

10 files changed

+56
-0
lines changed

tests/test_fine_tune.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import fine_tune
2+
3+
4+
def test_syntax():
5+
# Very simply testing that the train_network imports without syntax errors
6+
assert True

tests/test_flux_train.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import flux_train
2+
3+
4+
def test_syntax():
5+
# Very simply testing that the train_network imports without syntax errors
6+
assert True

tests/test_flux_train_network.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import flux_train_network
2+
3+
def test_syntax():
4+
# Very simply testing that the flux_train_network imports without syntax errors
5+
assert True

tests/test_sd3_train.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import sd3_train
2+
3+
4+
def test_syntax():
5+
# Very simply testing that the train_network imports without syntax errors
6+
assert True

tests/test_sd3_train_network.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import sd3_train_network
2+
3+
def test_syntax():
4+
# Very simply testing that the flux_train_network imports without syntax errors
5+
assert True

tests/test_sdxl_train.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import sdxl_train
2+
3+
4+
def test_syntax():
5+
# Very simply testing that the train_network imports without syntax errors
6+
assert True

tests/test_sdxl_train_network.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import sdxl_train_network
2+
3+
4+
def test_syntax():
5+
# Very simply testing that the train_network imports without syntax errors
6+
assert True

tests/test_train.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import train_db
2+
3+
4+
def test_syntax():
5+
# Very simply testing that the train_network imports without syntax errors
6+
assert True

tests/test_train_network.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import train_network
2+
3+
def test_syntax():
4+
# Very simply testing that the train_network imports without syntax errors
5+
assert True

tests/test_train_textual_inversion.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import train_textual_inversion
2+
3+
def test_syntax():
4+
# Very simply testing that the train_network imports without syntax errors
5+
assert True

0 commit comments

Comments
 (0)