8000 Update NUnit syntax · attackgithub/pythonnet@58bc902 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58bc902

Browse files
committed
Update NUnit syntax
Use xUnit2 and nUnit3 friendly syntax
1 parent 9cfb4f1 commit 58bc902

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def run(self):
373373
url='https://pythonnet.github.io/',
374374
license='MIT',
375375
author="The Python for .Net developers",
376-
email="pythondotnet@python.org",
376+
author_email="pythondotnet@python.org",
377377
setup_requires=setup_requires,
378378
long_description=_get_long_description(),
379379
ext_modules=[

src/embed_tests/pyinitialize.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public static void LoadSpecificArgs()
1212
using (new PythonEngine(args))
1313
using (var argv = new PyList(Runtime.Runtime.PySys_GetObject("argv")))
1414
{
15-
Assert.That(argv[0].ToString() == args[0]);
16-
Assert.That(argv[1].ToString() == args[1]);
15+
Assert.AreEqual(args[0], argv[0].ToString());
16+
Assert.AreEqual(args[1], argv[1].ToString());
1717
}
1818
}
1919

@@ -23,7 +23,7 @@ public static void LoadDefaultArgs()
2323
using (new PythonEngine())
2424
using (var argv = new PyList(Runtime.Runtime.PySys_GetObject("argv")))
2525
{
26-
Assert.That(argv.Length() != 0);
26+
Assert.AreNotEqual(0, argv.Length());
2727
}
2828
}
2929

src/embed_tests/pythonexception.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void TestMessage()
4747
[Test]
4848
public void TestNoError()
4949
{
50-
var e = new PythonException(); //There is no PyErr to fetch
50+
var e = new PythonException(); // There is no PyErr to fetch
5151
Assert.AreEqual("", e.Message);
5252
}
5353
}

src/embed_tests/pytuple.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ public void TestPyTupleEmpty()
1616
}
1717

1818
[Test]
19-
[ExpectedException("Python.Runtime.PythonException")]
2019
public void TestPyTupleInvalidAppend()
2120
{
2221
using (Py.GIL())
2322
{
2423
PyObject s = new PyString("foo");
2524
var t = new PyTuple();
26-
t.Concat(s);
25+
Assert.Throws<PythonException>(() => t.Concat(s));
2726
}
2827
}
2928

0 commit comments

Comments
 (0)
0